浏览代码

add 验证码

tags/V2.2.0
chenjiandong 2 年前
父节点
当前提交
1a1403c82a
共有 2 个文件被更改,包括 7 次插入9 次删除
  1. +1
    -2
      tuoheng_oidc_server/src/main/java/com/tuoheng/config/SecurityConfig.java
  2. +6
    -7
      tuoheng_oidc_server/src/main/java/com/tuoheng/controller/Oauth2Controller.java

+ 1
- 2
tuoheng_oidc_server/src/main/java/com/tuoheng/config/SecurityConfig.java 查看文件

@@ -100,8 +100,7 @@ public class SecurityConfig {
form.loginPage("/toLogin")
.loginProcessingUrl("/login")
)
.logout()
.logoutSuccessUrl("/toLogout");;
.logout();

return http.build();
}

+ 6
- 7
tuoheng_oidc_server/src/main/java/com/tuoheng/controller/Oauth2Controller.java 查看文件

@@ -45,13 +45,12 @@ public class Oauth2Controller {
@GetMapping("/toLogout")
public void exit(HttpServletRequest request, HttpServletResponse response) {
new SecurityContextLogoutHandler().logout(request, null, null);
try {
System.out.println(request.getHeader("referer"));
response.sendRedirect(request.getHeader("referer"));
response.sendRedirect("http://www.baidu.com");
} catch (IOException e) {
e.printStackTrace();
}
// try {
// System.out.println(request.getHeader("referer"));
// response.sendRedirect(request.getHeader("referer"));
// } catch (IOException e) {
// e.printStackTrace();
// }
}

}

正在加载...
取消
保存