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

公開メンバ関数

 IsActionRequired (ActionTokenContext<?> context, Action expectedAction)
 
boolean test (JsonWebToken t) throws VerificationException
 
boolean test (T t) throws VerificationException
 

非公開変数類

final ActionTokenContext<?> context
 
final AuthenticationSessionModel.Action expectedAction
 

詳解

Verifies that if authentication session exists and any action is required according to it, then it is the expected one.

If there is an action required in the session, furthermore it is not the expected one, and the required action is redirection to "required actions", it throws with response performing the redirect to required actions.

構築子と解体子

◆ IsActionRequired()

org.keycloak.services.resources.LoginActionsServiceChecks.IsActionRequired.IsActionRequired ( ActionTokenContext<?>  context,
Action  expectedAction 
)
inline
88  {
89  this.context = context;
91  }
final ActionTokenContext<?> context
Definition: LoginActionsServiceChecks.java:84
final AuthenticationSessionModel.Action expectedAction
Definition: LoginActionsServiceChecks.java:86

関数詳解

◆ test() [1/2]

boolean org.keycloak.TokenVerifier< T extends JsonWebToken >.Predicate< T extends JsonWebToken >.test ( t) throws VerificationException
inherited

Performs a single check on the given token verifier.

引数
tToken, guaranteed to be non-null.
戻り値
例外
VerificationException

◆ test() [2/2]

boolean org.keycloak.services.resources.LoginActionsServiceChecks.IsActionRequired.test ( JsonWebToken  t) throws VerificationException
inline
94  {
95  AuthenticationSessionModel authSession = context.getAuthenticationSession();
96 
97  if (authSession != null && ! Objects.equals(authSession.getAction(), this.expectedAction.name())) {
98  if (Objects.equals(AuthenticationSessionModel.Action.REQUIRED_ACTIONS.name(), authSession.getAction())) {
99  throw new LoginActionsServiceException(
100  AuthenticationManager.nextActionAfterAuthentication(context.getSession(), authSession,
102  }
103  throw new ExplainedTokenVerificationException(t, Errors.INVALID_TOKEN, Messages.INVALID_CODE);
104  }
105 
106  return true;
107  }
final ActionTokenContext<?> context
Definition: LoginActionsServiceChecks.java:84
HttpRequest getRequest()
Definition: ActionTokenContext.java:105
UriInfo getUriInfo()
Definition: ActionTokenContext.java:97
EventBuilder getEvent()
Definition: ActionTokenContext.java:81
AuthenticationSessionModel getAuthenticationSession()
Definition: ActionTokenContext.java:134
ClientConnection getClientConnection()
Definition: ActionTokenContext.java:101
final AuthenticationSessionModel.Action expectedAction
Definition: LoginActionsServiceChecks.java:86
KeycloakSession getSession()
Definition: ActionTokenContext.java:89

メンバ詳解

◆ context

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

◆ expectedAction

final AuthenticationSessionModel.Action org.keycloak.services.resources.LoginActionsServiceChecks.IsActionRequired.expectedAction
private

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