keycloak-spi-private
公開メンバ関数 | 全メンバ一覧
org.keycloak.authentication.AuthenticationFlowContext インタフェース
org.keycloak.authentication.AuthenticationFlowContext の継承関係図
Inheritance graph
org.keycloak.authentication.AuthenticationFlowContext 連携図
Collaboration graph

公開メンバ関数

UserModel getUser ()
 
void setUser (UserModel user)
 
void clearUser ()
 
void attachUserSession (UserSessionModel userSession)
 
AuthenticationSessionModel getAuthenticationSession ()
 
LoginFormsProvider form ()
 
URI getActionUrl (String code)
 
URI getActionUrl (String code, boolean authSessionIdParam)
 
URI getActionTokenUrl (String tokenString)
 
URI getRefreshExecutionUrl ()
 
URI getRefreshUrl (boolean authSessionIdParam)
 
void cancelLogin ()
 
void resetFlow ()
 
void resetFlow (Runnable afterResetListener)
 
void fork ()
 
void forkWithSuccessMessage (FormMessage message)
 
void forkWithErrorMessage (FormMessage message)
 
EventBuilder getEvent ()
 
EventBuilder newEvent ()
 
AuthenticationExecutionModel getExecution ()
 
RealmModel getRealm ()
 
ClientConnection getConnection ()
 
UriInfo getUriInfo ()
 
KeycloakSession getSession ()
 
HttpRequest getHttpRequest ()
 
BruteForceProtector getProtector ()
 
AuthenticatorConfigModel getAuthenticatorConfig ()
 
FormMessage getForwardedErrorMessage ()
 
FormMessage getForwardedSuccessMessage ()
 
String generateAccessCode ()
 
AuthenticationExecutionModel.Requirement getCategoryRequirementFromCurrentFlow (String authenticatorCategory)
 
void success ()
 
void failure (AuthenticationFlowError error)
 
void failure (AuthenticationFlowError error, Response response)
 
void challenge (Response challenge)
 
void forceChallenge (Response challenge)
 
void failureChallenge (AuthenticationFlowError error, Response challenge)
 
void attempted ()
 
FlowStatus getStatus ()
 
AuthenticationFlowError getError ()
 

詳解

This interface encapsulates information about an execution in an AuthenticationFlow. It is also used to set the status of the execution being performed.

著者
Bill Burke
バージョン
Revision
1

関数詳解

◆ attachUserSession()

void org.keycloak.authentication.AuthenticationFlowContext.attachUserSession ( UserSessionModel  userSession)

◆ attempted()

void org.keycloak.authentication.AbstractAuthenticationFlowContext.attempted ( )
inherited

There was no failure or challenge. The authenticator was attempted, but not fulfilled. If the current execution requirement is alternative or optional, then this status is ignored by the flow.

◆ cancelLogin()

void org.keycloak.authentication.AuthenticationFlowContext.cancelLogin ( )

End the flow and redirect browser based on protocol specific respones. This should only be executed in browser-based flows.

◆ challenge()

void org.keycloak.authentication.AbstractAuthenticationFlowContext.challenge ( Response  challenge)
inherited

Sends a challenge response back to the HTTP client. If the current execution requirement is optional, this response will not be sent. If the current execution requirement is alternative, then this challenge will be sent if no other alternative execution was successful.

引数
challenge

◆ clearUser()

void org.keycloak.authentication.AuthenticationFlowContext.clearUser ( )

Clear the user from the flow.

◆ failure() [1/2]

void org.keycloak.authentication.AbstractAuthenticationFlowContext.failure ( AuthenticationFlowError  error)
inherited

Aborts the current flow

引数
error

◆ failure() [2/2]

void org.keycloak.authentication.AbstractAuthenticationFlowContext.failure ( AuthenticationFlowError  error,
Response  response 
)
inherited

Aborts the current flow.

引数
error
responseResponse that will be sent back to HTTP client

◆ failureChallenge()

void org.keycloak.authentication.AbstractAuthenticationFlowContext.failureChallenge ( AuthenticationFlowError  error,
Response  challenge 
)
inherited

Same behavior as forceChallenge(), but the error count in brute force attack detection will be incremented. For example, if a user enters in a bad password, the user is directed to try again, but Keycloak will keep track of how many failures have happened.

引数
error
challenge

◆ forceChallenge()

void org.keycloak.authentication.AbstractAuthenticationFlowContext.forceChallenge ( Response  challenge)
inherited

Sends the challenge back to the HTTP client irregardless of the current executionr requirement

引数
challenge

◆ fork()

void org.keycloak.authentication.AuthenticationFlowContext.fork ( )

Fork the current flow. The authentication session will be cloned and set to point at the realm's browser login flow. The Response will be the result of this fork. The previous flow will still be set at the current execution. This is used by reset password when it sends an email. It sends an email linking to the current flow and redirects the browser to a new browser login flow.

戻り値

◆ forkWithErrorMessage()

void org.keycloak.authentication.AuthenticationFlowContext.forkWithErrorMessage ( FormMessage  message)

Fork the current flow. The authentication session will be cloned and set to point at the realm's browser login flow. The Response will be the result of this fork. The previous flow will still be set at the current execution. This is used by reset password when it sends an email. It sends an email linking to the current flow and redirects the browser to a new browser login flow.

This method will set up an error message that will be displayed in the first page of the new flow

引数
messageCorresponds to raw text or a message property defined in a message bundle

◆ forkWithSuccessMessage()

void org.keycloak.authentication.AuthenticationFlowContext.forkWithSuccessMessage ( FormMessage  message)

Fork the current flow. The authentication session will be cloned and set to point at the realm's browser login flow. The Response will be the result of this fork. The previous flow will still be set at the current execution. This is used by reset password when it sends an email. It sends an email linking to the current flow and redirects the browser to a new browser login flow.

This method will set up a success message that will be displayed in the first page of the new flow

引数
messageCorresponds to raw text or a message property defined in a message bundle

◆ form()

LoginFormsProvider org.keycloak.authentication.AuthenticationFlowContext.form ( )

Create a Freemarker form builder that presets the user, action URI, and a generated access code

戻り値

◆ generateAccessCode()

String org.keycloak.authentication.AbstractAuthenticationFlowContext.generateAccessCode ( )
inherited

Generates access code and updates clientsession timestamp Access codes must be included in form action callbacks as a query parameter.

戻り値

◆ getActionTokenUrl()

URI org.keycloak.authentication.AuthenticationFlowContext.getActionTokenUrl ( String  tokenString)

Get the action URL for the action token executor.

引数
tokenStringString representation (JWT) of action token
戻り値

◆ getActionUrl() [1/2]

URI org.keycloak.authentication.AuthenticationFlowContext.getActionUrl ( String  code)

Get the action URL for the required action.

引数
codeauthentication session access code
戻り値

◆ getActionUrl() [2/2]

URI org.keycloak.authentication.AuthenticationFlowContext.getActionUrl ( String  code,
boolean  authSessionIdParam 
)

Get the action URL for the required action.

引数
codeauthentication session access code
authSessionIdParamwill include auth_session query param for clients that don't process cookies
戻り値

◆ getAuthenticationSession()

AuthenticationSessionModel org.keycloak.authentication.AuthenticationFlowContext.getAuthenticationSession ( )

AuthenticationSessionModel attached to this flow

戻り値

◆ getAuthenticatorConfig()

AuthenticatorConfigModel org.keycloak.authentication.AbstractAuthenticationFlowContext.getAuthenticatorConfig ( )
inherited

Get any configuration associated with the current execution

戻り値

◆ getCategoryRequirementFromCurrentFlow()

AuthenticationExecutionModel.Requirement org.keycloak.authentication.AbstractAuthenticationFlowContext.getCategoryRequirementFromCurrentFlow ( String  authenticatorCategory)
inherited

◆ getConnection()

ClientConnection org.keycloak.authentication.AbstractAuthenticationFlowContext.getConnection ( )
inherited

Information about the IP address from the connecting HTTP client.

戻り値

◆ getError()

AuthenticationFlowError org.keycloak.authentication.AbstractAuthenticationFlowContext.getError ( )
inherited

Get the error condition of a failed execution.

戻り値
may return null if there was no error

◆ getEvent()

EventBuilder org.keycloak.authentication.AbstractAuthenticationFlowContext.getEvent ( )
inherited

Current event builder being used

戻り値

◆ getExecution()

AuthenticationExecutionModel org.keycloak.authentication.AbstractAuthenticationFlowContext.getExecution ( )
inherited

The current execution in the flow

戻り値

◆ getForwardedErrorMessage()

FormMessage org.keycloak.authentication.AbstractAuthenticationFlowContext.getForwardedErrorMessage ( )
inherited

This could be an error message forwarded from another authenticator that is restarting or continuing the flo. For example the brokering API sends this when the broker failed authentication and we want to continue authentication locally. forwardedErrorMessage can then be displayed by whatever form is challenging.

◆ getForwardedSuccessMessage()

FormMessage org.keycloak.authentication.AbstractAuthenticationFlowContext.getForwardedSuccessMessage ( )
inherited

This could be an success message forwarded from another authenticator that is restarting or continuing the flow. For example a reset password sends an email, then resets the flow with a success message. forwardedSuccessMessage can then be displayed by whatever form is challenging.

◆ getHttpRequest()

HttpRequest org.keycloak.authentication.AbstractAuthenticationFlowContext.getHttpRequest ( )
inherited

◆ getProtector()

BruteForceProtector org.keycloak.authentication.AbstractAuthenticationFlowContext.getProtector ( )
inherited

◆ getRealm()

RealmModel org.keycloak.authentication.AbstractAuthenticationFlowContext.getRealm ( )
inherited

Current realm

戻り値

◆ getRefreshExecutionUrl()

URI org.keycloak.authentication.AuthenticationFlowContext.getRefreshExecutionUrl ( )

Get the refresh URL for the required action.

戻り値

◆ getRefreshUrl()

URI org.keycloak.authentication.AuthenticationFlowContext.getRefreshUrl ( boolean  authSessionIdParam)

Get the refresh URL for the flow.

引数
authSessionIdParamwill include auth_session query param for clients that don't process cookies
戻り値

◆ getSession()

KeycloakSession org.keycloak.authentication.AbstractAuthenticationFlowContext.getSession ( )
inherited

Current session

戻り値

◆ getStatus()

FlowStatus org.keycloak.authentication.AbstractAuthenticationFlowContext.getStatus ( )
inherited

Get the current status of the current execution.

戻り値
may return null if not set yet.

◆ getUriInfo()

UriInfo org.keycloak.authentication.AbstractAuthenticationFlowContext.getUriInfo ( )
inherited

UriInfo of the current request

戻り値

◆ getUser()

UserModel org.keycloak.authentication.AuthenticationFlowContext.getUser ( )

Current user attached to this flow. It can return null if no user has been identified yet

戻り値

◆ newEvent()

EventBuilder org.keycloak.authentication.AbstractAuthenticationFlowContext.newEvent ( )
inherited

Create a refresh new EventBuilder to use within this context

戻り値

◆ resetFlow() [1/2]

void org.keycloak.authentication.AuthenticationFlowContext.resetFlow ( )

Reset the current flow to the beginning and restarts it.

◆ resetFlow() [2/2]

void org.keycloak.authentication.AuthenticationFlowContext.resetFlow ( Runnable  afterResetListener)

Reset the current flow to the beginning and restarts it. Allows to add additional listener, which is triggered after flow restarted

◆ setUser()

void org.keycloak.authentication.AuthenticationFlowContext.setUser ( UserModel  user)

Attach a specific user to this flow.

引数
user

◆ success()

void org.keycloak.authentication.AbstractAuthenticationFlowContext.success ( )
inherited

Mark the current execution as successful. The flow will then continue


このインタフェース詳解は次のファイルから抽出されました: