您最多能選擇 25 個主題
主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
27 行
1015 B
27 行
1015 B
package com.aiprose.scauth.handler;
|
|
|
|
import org.springframework.security.core.Authentication;
|
|
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
|
|
|
import javax.servlet.ServletException;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* @author nelson
|
|
* @desc TODO
|
|
* @company 北京中经网软件有限公司
|
|
* @date 2020/11/27 16:15
|
|
* @since 1.0
|
|
*/
|
|
public class LoginSuccessHandler implements AuthenticationSuccessHandler {
|
|
@Override
|
|
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
|
|
System.out.println("login success");
|
|
System.out.println(authentication.getDetails());
|
|
System.out.println(authentication.getAuthorities());
|
|
System.out.println(authentication.getCredentials());
|
|
System.out.println(authentication.getPrincipal());
|
|
}
|
|
}
|
|
|