public class AuthenticationProcessor.Result extends Object implements AuthenticationFlowContext, ClientAuthenticationFlowContext
| Modifier and Type | Method and Description |
|---|---|
void |
attachUserSession(UserSessionModel userSession) |
void |
attempted()
There was no failure or challenge.
|
void |
cancelLogin()
End the flow and redirect browser based on protocol specific respones.
|
void |
challenge(javax.ws.rs.core.Response challenge)
Sends a challenge response back to the HTTP client.
|
void |
clearUser()
Clear the user from the flow.
|
void |
failure(AuthenticationFlowError error)
Aborts the current flow
|
void |
failure(AuthenticationFlowError error,
javax.ws.rs.core.Response challenge)
Aborts the current flow.
|
void |
failureChallenge(AuthenticationFlowError error,
javax.ws.rs.core.Response challenge)
Same behavior as forceChallenge(), but the error count in brute force attack detection will be incremented.
|
void |
forceChallenge(javax.ws.rs.core.Response challenge)
Sends the challenge back to the HTTP client irregardless of the current executionr requirement
|
void |
fork()
Fork the current flow.
|
void |
forkWithErrorMessage(FormMessage message)
Fork the current flow.
|
void |
forkWithSuccessMessage(FormMessage message)
Fork the current flow.
|
LoginFormsProvider |
form()
Create a Freemarker form builder that presets the user, action URI, and a generated access code
|
String |
generateAccessCode()
Generates access code and updates clientsession timestamp
Access codes must be included in form action callbacks as a query parameter.
|
URI |
getActionTokenUrl(String tokenString)
Get the action URL for the action token executor.
|
URI |
getActionUrl(String code)
Get the action URL for the required action.
|
URI |
getActionUrl(String code,
boolean authSessionIdParam)
Get the action URL for the required action.
|
List<AuthenticationSelectionOption> |
getAuthenticationSelections() |
AuthenticationSessionModel |
getAuthenticationSession()
AuthenticationSessionModel attached to this flow
|
Authenticator |
getAuthenticator() |
AuthenticatorConfigModel |
getAuthenticatorConfig()
Get any configuration associated with the current execution
|
AuthenticationExecutionModel.Requirement |
getCategoryRequirementFromCurrentFlow(String authenticatorCategory) |
javax.ws.rs.core.Response |
getChallenge() |
ClientModel |
getClient()
Current client attached to this flow.
|
Map<String,String> |
getClientAuthAttributes()
Return the map where the authenticators can put some additional state related to authenticated client and the context how was
client authenticated (ie.
|
ClientAuthenticator |
getClientAuthenticator() |
ClientConnection |
getConnection()
Information about the IP address from the connecting HTTP client.
|
AuthenticationFlowError |
getError()
Get the error condition of a failed execution.
|
FormMessage |
getErrorMessage() |
EventBuilder |
getEvent()
Current event builder being used
|
AuthenticationExecutionModel |
getExecution()
The current execution in the flow
|
String |
getFlowPath() |
FormMessage |
getForwardedErrorMessage()
This could be an error message forwarded from another authenticator that is restarting or continuing the flo.
|
FormMessage |
getForwardedSuccessMessage()
This could be an success message forwarded from another authenticator that is restarting or continuing the flow.
|
org.jboss.resteasy.spi.HttpRequest |
getHttpRequest() |
BruteForceProtector |
getProtector() |
RealmModel |
getRealm()
Current realm
|
URI |
getRefreshExecutionUrl()
Get the refresh URL for the required action.
|
URI |
getRefreshUrl(boolean authSessionIdParam)
Get the refresh URL for the flow.
|
KeycloakSession |
getSession()
Current session
|
FlowStatus |
getStatus()
Get the current status of the current execution.
|
FormMessage |
getSuccessMessage() |
javax.ws.rs.core.UriInfo |
getUriInfo()
UriInfo of the current request
|
UserModel |
getUser()
Current user attached to this flow.
|
EventBuilder |
newEvent()
Create a refresh new EventBuilder to use within this context
|
void |
resetFlow()
Reset the current flow to the beginning and restarts it.
|
void |
resetFlow(Runnable afterResetListener)
Reset the current flow to the beginning and restarts it.
|
void |
setAuthenticationSelections(List<AuthenticationSelectionOption> authenticationSelections) |
void |
setClient(ClientModel client)
Attach a specific client to this flow.
|
void |
setUser(UserModel user)
Attach a specific user to this flow.
|
void |
success()
Mark the current execution as successful.
|
public EventBuilder newEvent()
AbstractAuthenticationFlowContextnewEvent in interface AbstractAuthenticationFlowContextpublic AuthenticationExecutionModel.Requirement getCategoryRequirementFromCurrentFlow(String authenticatorCategory)
getCategoryRequirementFromCurrentFlow in interface AbstractAuthenticationFlowContextpublic AuthenticationExecutionModel getExecution()
AbstractAuthenticationFlowContextgetExecution in interface AbstractAuthenticationFlowContextpublic AuthenticatorConfigModel getAuthenticatorConfig()
AbstractAuthenticationFlowContextgetAuthenticatorConfig in interface AbstractAuthenticationFlowContextpublic Authenticator getAuthenticator()
public FlowStatus getStatus()
AbstractAuthenticationFlowContextgetStatus in interface AbstractAuthenticationFlowContextpublic ClientAuthenticator getClientAuthenticator()
public void success()
AbstractAuthenticationFlowContextsuccess in interface AbstractAuthenticationFlowContextpublic void failure(AuthenticationFlowError error)
AbstractAuthenticationFlowContextfailure in interface AbstractAuthenticationFlowContextpublic void challenge(javax.ws.rs.core.Response challenge)
AbstractAuthenticationFlowContextchallenge in interface AbstractAuthenticationFlowContextpublic void forceChallenge(javax.ws.rs.core.Response challenge)
AbstractAuthenticationFlowContextforceChallenge in interface AbstractAuthenticationFlowContextpublic void failureChallenge(AuthenticationFlowError error, javax.ws.rs.core.Response challenge)
AbstractAuthenticationFlowContextfailureChallenge in interface AbstractAuthenticationFlowContextpublic void failure(AuthenticationFlowError error, javax.ws.rs.core.Response challenge)
AbstractAuthenticationFlowContextfailure in interface AbstractAuthenticationFlowContextchallenge - Response that will be sent back to HTTP clientpublic void attempted()
AbstractAuthenticationFlowContextattempted in interface AbstractAuthenticationFlowContextpublic UserModel getUser()
AuthenticationFlowContextgetUser in interface AuthenticationFlowContextpublic void setUser(UserModel user)
AuthenticationFlowContextsetUser in interface AuthenticationFlowContextpublic List<AuthenticationSelectionOption> getAuthenticationSelections()
getAuthenticationSelections in interface AuthenticationFlowContextpublic void setAuthenticationSelections(List<AuthenticationSelectionOption> authenticationSelections)
setAuthenticationSelections in interface AuthenticationFlowContextpublic void clearUser()
AuthenticationFlowContextclearUser in interface AuthenticationFlowContextpublic RealmModel getRealm()
AbstractAuthenticationFlowContextgetRealm in interface AbstractAuthenticationFlowContextpublic ClientModel getClient()
ClientAuthenticationFlowContextgetClient in interface ClientAuthenticationFlowContextpublic void setClient(ClientModel client)
ClientAuthenticationFlowContextsetClient in interface ClientAuthenticationFlowContextpublic Map<String,String> getClientAuthAttributes()
ClientAuthenticationFlowContextgetClientAuthAttributes in interface ClientAuthenticationFlowContextpublic AuthenticationSessionModel getAuthenticationSession()
AuthenticationFlowContextgetAuthenticationSession in interface AuthenticationFlowContextpublic String getFlowPath()
getFlowPath in interface AuthenticationFlowContextpublic ClientConnection getConnection()
AbstractAuthenticationFlowContextgetConnection in interface AbstractAuthenticationFlowContextpublic javax.ws.rs.core.UriInfo getUriInfo()
AbstractAuthenticationFlowContextgetUriInfo in interface AbstractAuthenticationFlowContextpublic KeycloakSession getSession()
AbstractAuthenticationFlowContextgetSession in interface AbstractAuthenticationFlowContextpublic org.jboss.resteasy.spi.HttpRequest getHttpRequest()
getHttpRequest in interface AbstractAuthenticationFlowContextpublic void attachUserSession(UserSessionModel userSession)
attachUserSession in interface AuthenticationFlowContextpublic BruteForceProtector getProtector()
getProtector in interface AbstractAuthenticationFlowContextpublic EventBuilder getEvent()
AbstractAuthenticationFlowContextgetEvent in interface AbstractAuthenticationFlowContextpublic FormMessage getForwardedErrorMessage()
AbstractAuthenticationFlowContextgetForwardedErrorMessage in interface AbstractAuthenticationFlowContextpublic String generateAccessCode()
AbstractAuthenticationFlowContextgenerateAccessCode in interface AbstractAuthenticationFlowContextpublic javax.ws.rs.core.Response getChallenge()
public AuthenticationFlowError getError()
AbstractAuthenticationFlowContextgetError in interface AbstractAuthenticationFlowContextpublic LoginFormsProvider form()
AuthenticationFlowContextform in interface AuthenticationFlowContextpublic URI getActionUrl(String code)
AuthenticationFlowContextgetActionUrl in interface AuthenticationFlowContextcode - authentication session access codepublic URI getActionTokenUrl(String tokenString)
AuthenticationFlowContextgetActionTokenUrl in interface AuthenticationFlowContexttokenString - String representation (JWT) of action tokenpublic URI getActionUrl(String code, boolean authSessionIdParam)
AuthenticationFlowContextgetActionUrl in interface AuthenticationFlowContextcode - authentication session access codeauthSessionIdParam - will include auth_session query param for clients that don't process cookiespublic URI getRefreshExecutionUrl()
AuthenticationFlowContextgetRefreshExecutionUrl in interface AuthenticationFlowContextpublic URI getRefreshUrl(boolean authSessionIdParam)
AuthenticationFlowContextgetRefreshUrl in interface AuthenticationFlowContextauthSessionIdParam - will include auth_session query param for clients that don't process cookiespublic void cancelLogin()
AuthenticationFlowContextcancelLogin in interface AuthenticationFlowContextpublic void resetFlow()
AuthenticationFlowContextresetFlow in interface AuthenticationFlowContextpublic void resetFlow(Runnable afterResetListener)
AuthenticationFlowContextresetFlow in interface AuthenticationFlowContextpublic void fork()
AuthenticationFlowContextfork in interface AuthenticationFlowContextpublic void forkWithSuccessMessage(FormMessage message)
AuthenticationFlowContextforkWithSuccessMessage in interface AuthenticationFlowContextmessage - Corresponds to raw text or a message property defined in a message bundlepublic void forkWithErrorMessage(FormMessage message)
AuthenticationFlowContextforkWithErrorMessage in interface AuthenticationFlowContextmessage - Corresponds to raw text or a message property defined in a message bundlepublic FormMessage getForwardedSuccessMessage()
AbstractAuthenticationFlowContextgetForwardedSuccessMessage in interface AbstractAuthenticationFlowContextpublic FormMessage getErrorMessage()
public FormMessage getSuccessMessage()
Copyright © 2021 JBoss by Red Hat. All rights reserved.