mitreid-connect
公開メンバ関数 | 静的公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.web.AuthenticationTimeStamper クラス
org.mitre.openid.connect.web.AuthenticationTimeStamper の継承関係図
Inheritance graph
org.mitre.openid.connect.web.AuthenticationTimeStamper 連携図
Collaboration graph

公開メンバ関数

void onAuthenticationSuccess (HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException
 

静的公開変数類

static final String AUTH_TIMESTAMP = "AUTH_TIMESTAMP"
 

静的非公開変数類

static final Logger logger = LoggerFactory.getLogger(AuthenticationTimeStamper.class)
 

詳解

This class sets a timestamp on the current HttpSession when someone successfully authenticates.

著者
jricher

関数詳解

◆ onAuthenticationSuccess()

void org.mitre.openid.connect.web.AuthenticationTimeStamper.onAuthenticationSuccess ( HttpServletRequest  request,
HttpServletResponse  response,
Authentication  authentication 
) throws IOException, ServletException
inline

Set the timestamp on the session to mark when the authentication happened, useful for calculating authentication age. This gets stored in the sesion and can get pulled out by other components.

61  {
62 
63  Date authTimestamp = new Date();
64 
65  HttpSession session = request.getSession();
66 
67  session.setAttribute(AUTH_TIMESTAMP, authTimestamp);
68 
69  if (session.getAttribute(AuthorizationRequestFilter.PROMPT_REQUESTED) != null) {
70  session.setAttribute(AuthorizationRequestFilter.PROMPTED, Boolean.TRUE);
71  session.removeAttribute(AuthorizationRequestFilter.PROMPT_REQUESTED);
72  }
73 
74  logger.info("Successful Authentication of " + authentication.getName() + " at " + authTimestamp.toString());
75 
76  super.onAuthenticationSuccess(request, response, authentication);
77 
78  }
static final String AUTH_TIMESTAMP
Definition: AuthenticationTimeStamper.java:53
static final Logger logger
Definition: AuthenticationTimeStamper.java:51

メンバ詳解

◆ AUTH_TIMESTAMP

final String org.mitre.openid.connect.web.AuthenticationTimeStamper.AUTH_TIMESTAMP = "AUTH_TIMESTAMP"
static

◆ logger

final Logger org.mitre.openid.connect.web.AuthenticationTimeStamper.logger = LoggerFactory.getLogger(AuthenticationTimeStamper.class)
staticprivate

Logger for this class


このクラス詳解は次のファイルから抽出されました: