org.springframework.security.core.AuthenticationException#toString ( )源码实例Demo

下面列出了org.springframework.security.core.AuthenticationException#toString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: blog-sample   文件: LoginController.java
@RequestMapping("/login/error")
@ResponseBody
public Msg<?> loginError(HttpServletRequest request) {
    AuthenticationException exception = (AuthenticationException)request.getSession().getAttribute("SPRING_SECURITY_LAST_EXCEPTION");

    return new Msg<>(false, exception.getMessage(), exception.toString());
}
 
源代码2 项目: blog-sample   文件: LoginController.java
@RequestMapping("/login/error")
@ResponseBody
public String loginError(HttpServletRequest request, HttpServletResponse response) {
    AuthenticationException exception =
            (AuthenticationException)request.getSession().getAttribute("SPRING_SECURITY_LAST_EXCEPTION");
    return exception.toString();
}