Explorar el Código

add 验证码

tags/V2.2.0
chenjiandong hace 2 años
padre
commit
1a1403c82a
Se han modificado 2 ficheros con 7 adiciones y 9 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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();
// }
}

}

Cargando…
Cancelar
Guardar