keycloak-service
公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken クラス
org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken の継承関係図
Inheritance graph
org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken 連携図
Collaboration graph

公開メンバ関数

 AuthenticationSessionUserIdMatchesOneFromToken (ActionTokenContext<?> context)
 
boolean test (JsonWebToken t) throws VerificationException
 

非公開変数類

final ActionTokenContext<?> context
 

詳解

This check verifies that user ID (subject) from the token matches the one from the authentication session.

構築子と解体子

◆ AuthenticationSessionUserIdMatchesOneFromToken()

org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken.AuthenticationSessionUserIdMatchesOneFromToken ( ActionTokenContext<?>  context)
inline
57  {
58  this.context = context;
59  }
final ActionTokenContext<?> context
Definition: LoginActionsServiceChecks.java:55

関数詳解

◆ test()

boolean org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken.test ( JsonWebToken  t) throws VerificationException
inline
62  {
63  AuthenticationSessionModel authSession = context.getAuthenticationSession();
64 
65  if (authSession == null || authSession.getAuthenticatedUser() == null
66  || ! Objects.equals(t.getSubject(), authSession.getAuthenticatedUser().getId())) {
67  throw new ExplainedTokenVerificationException(t, Errors.INVALID_TOKEN, Messages.INVALID_USER);
68  }
69 
70  return true;
71  }
AuthenticationSessionModel getAuthenticationSession()
Definition: ActionTokenContext.java:134
final ActionTokenContext<?> context
Definition: LoginActionsServiceChecks.java:55

メンバ詳解

◆ context

final ActionTokenContext<?> org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken.context
private

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