Package org.keycloak.authentication
Class AuthenticationProcessor
java.lang.Object
org.keycloak.authentication.AuthenticationProcessor
- Direct Known Subclasses:
ResetCredentialsActionTokenHandler.ResetCredsAuthenticationProcessor
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Runnablestatic final Stringprotected org.keycloak.sessions.AuthenticationSessionModelstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected org.keycloak.models.ClientModelprotected org.keycloak.common.ClientConnectionstatic final Stringstatic final Stringprotected org.keycloak.events.EventBuilderstatic final Stringprotected Stringprotected Stringstatic final Stringstatic final Stringprotected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStoreThis could be an error message forwarded from another authenticatorprotected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStoreThis could be an success message forwarded from another authenticatorprotected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStoreThis could be an success message forwarded from another authenticatorstatic final Stringprotected static final org.jboss.logging.Loggerprotected org.keycloak.services.managers.BruteForceProtectorprotected org.keycloak.models.RealmModelprotected org.keycloak.http.HttpRequestprotected org.keycloak.models.KeycloakSessionprotected jakarta.ws.rs.core.UriInfoprotected org.keycloak.models.UserSessionModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.keycloak.models.ClientSessionContextstatic org.keycloak.models.ClientSessionContextattachSession(org.keycloak.sessions.AuthenticationSessionModel authSession, org.keycloak.models.UserSessionModel userSession, org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.common.ClientConnection connection, org.keycloak.events.EventBuilder event) jakarta.ws.rs.core.Responsejakarta.ws.rs.core.Responsejakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponseauthenticationAction(String execution) protected jakarta.ws.rs.core.Responsevoidstatic org.keycloak.sessions.AuthenticationSessionModelclone(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authSession) createAuthenticatorContext(org.keycloak.models.AuthenticationExecutionModel model, org.keycloak.authentication.Authenticator authenticator, List<org.keycloak.models.AuthenticationExecutionModel> executions) createClientAuthenticatorContext(org.keycloak.models.AuthenticationExecutionModel model, org.keycloak.authentication.ClientAuthenticator clientAuthenticator, List<org.keycloak.models.AuthenticationExecutionModel> executions) org.keycloak.authentication.AuthenticationFlowcreateFlowExecution(String flowId, org.keycloak.models.AuthenticationExecutionModel execution) voidjakarta.ws.rs.core.ResponsefinishAuthentication(org.keycloak.protocol.LoginProtocol protocol) org.keycloak.sessions.AuthenticationSessionModelorg.keycloak.services.managers.BruteForceProtectororg.keycloak.models.ClientModelstatic StringgetClientData(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authSession) org.keycloak.common.ClientConnectionorg.keycloak.events.EventBuildergetEvent()org.keycloak.models.RealmModelgetRealm()getRefreshUrl(boolean authSessionIdParam) org.keycloak.http.HttpRequestorg.keycloak.models.KeycloakSessionjakarta.ws.rs.core.UriInfoorg.keycloak.models.UserSessionModeljakarta.ws.rs.core.ResponsehandleBrowserException(Exception failure) jakarta.ws.rs.core.ResponsehandleBrowserExceptionList(org.keycloak.authentication.AuthenticationFlowException e) jakarta.ws.rs.core.ResponsehandleClientAuthException(Exception failure) booleanbooleanisSuccessful(org.keycloak.models.AuthenticationExecutionModel model) voidlogFailure(String executionId) org.keycloak.events.EventBuildernewEvent()static org.keycloak.sessions.AuthenticationSessionModelrecreate(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authSession) jakarta.ws.rs.core.Responsevoidstatic voidsetAuthenticationSession(org.keycloak.sessions.AuthenticationSessionModel authenticationSession) voidsetAutheticatedUser(org.keycloak.models.UserModel user) setBrowserFlow(boolean browserFlow) voidsetClient(org.keycloak.models.ClientModel client) setConnection(org.keycloak.common.ClientConnection connection) setEventBuilder(org.keycloak.events.EventBuilder eventBuilder) setFlowPath(String flowPath) This is the path segment to append when generating an action URL.setForwardedErrorMessage(org.keycloak.models.utils.FormMessage forwardedErrorMessage) setForwardedInfoMessage(org.keycloak.models.utils.FormMessage forwardedInfoMessage) setForwardedSuccessMessage(org.keycloak.models.utils.FormMessage forwardedSuccessMessage) setRealm(org.keycloak.models.RealmModel realm) setRequest(org.keycloak.http.HttpRequest request) setSession(org.keycloak.models.KeycloakSession session) setUriInfo(jakarta.ws.rs.core.UriInfo uriInfo) voidvalidateUser(org.keycloak.models.UserModel authenticatedUser)
-
Field Details
-
CURRENT_AUTHENTICATION_EXECUTION
- See Also:
-
LAST_PROCESSED_EXECUTION
- See Also:
-
CURRENT_FLOW_PATH
- See Also:
-
FORKED_FROM
- See Also:
-
AUTHN_CREDENTIALS
- See Also:
-
BROKER_SESSION_ID
- See Also:
-
BROKER_USER_ID
- See Also:
-
FORWARDED_PASSIVE_LOGIN
- See Also:
-
AUTHENTICATION_SELECTOR_SCREEN_DISPLAYED
- See Also:
-
FIRST_OFFLINE_ACCESS
- See Also:
-
logger
protected static final org.jboss.logging.Logger logger -
realm
protected org.keycloak.models.RealmModel realm -
userSession
protected org.keycloak.models.UserSessionModel userSession -
authenticationSession
protected org.keycloak.sessions.AuthenticationSessionModel authenticationSession -
connection
protected org.keycloak.common.ClientConnection connection -
uriInfo
protected jakarta.ws.rs.core.UriInfo uriInfo -
session
protected org.keycloak.models.KeycloakSession session -
event
protected org.keycloak.events.EventBuilder event -
request
protected org.keycloak.http.HttpRequest request -
flowId
-
flowPath
-
browserFlow
protected boolean browserFlow -
protector
protected org.keycloak.services.managers.BruteForceProtector protector -
afterResetListener
-
forwardedErrorMessageStore
protected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStore forwardedErrorMessageStoreThis could be an error message forwarded from another authenticator -
forwardedSuccessMessageStore
protected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStore forwardedSuccessMessageStoreThis could be an success message forwarded from another authenticator -
forwardedInfoMessageStore
protected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStore forwardedInfoMessageStoreThis could be an success message forwarded from another authenticator -
client
protected org.keycloak.models.ClientModel client -
clientAuthAttributes
-
-
Constructor Details
-
AuthenticationProcessor
public AuthenticationProcessor()
-
-
Method Details
-
isBrowserFlow
public boolean isBrowserFlow() -
setBrowserFlow
-
getBruteForceProtector
public org.keycloak.services.managers.BruteForceProtector getBruteForceProtector() -
getRealm
public org.keycloak.models.RealmModel getRealm() -
getClient
public org.keycloak.models.ClientModel getClient() -
setClient
public void setClient(org.keycloak.models.ClientModel client) -
getClientAuthAttributes
-
getAuthenticationSession
public org.keycloak.sessions.AuthenticationSessionModel getAuthenticationSession() -
getConnection
public org.keycloak.common.ClientConnection getConnection() -
getUriInfo
public jakarta.ws.rs.core.UriInfo getUriInfo() -
getSession
public org.keycloak.models.KeycloakSession getSession() -
getUserSession
public org.keycloak.models.UserSessionModel getUserSession() -
setRealm
-
setAuthenticationSession
public AuthenticationProcessor setAuthenticationSession(org.keycloak.sessions.AuthenticationSessionModel authenticationSession) -
setConnection
-
setUriInfo
-
setSession
-
setEventBuilder
-
setRequest
-
setFlowId
-
setFlowPath
This is the path segment to append when generating an action URL.- Parameters:
flowPath-
-
setForwardedErrorMessage
public AuthenticationProcessor setForwardedErrorMessage(org.keycloak.models.utils.FormMessage forwardedErrorMessage) -
setForwardedSuccessMessage
public AuthenticationProcessor setForwardedSuccessMessage(org.keycloak.models.utils.FormMessage forwardedSuccessMessage) -
setForwardedInfoMessage
public AuthenticationProcessor setForwardedInfoMessage(org.keycloak.models.utils.FormMessage forwardedInfoMessage) -
generateCode
-
newEvent
public org.keycloak.events.EventBuilder newEvent() -
getEvent
public org.keycloak.events.EventBuilder getEvent() -
getRequest
public org.keycloak.http.HttpRequest getRequest() -
getFlowPath
-
setAutheticatedUser
public void setAutheticatedUser(org.keycloak.models.UserModel user) -
clearAuthenticatedUser
public void clearAuthenticatedUser() -
getClientData
public static String getClientData(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authSession) -
getRefreshUrl
-
logFailure
-
isSuccessful
public boolean isSuccessful(org.keycloak.models.AuthenticationExecutionModel model) -
handleBrowserExceptionList
public jakarta.ws.rs.core.Response handleBrowserExceptionList(org.keycloak.authentication.AuthenticationFlowException e) -
handleBrowserException
-
handleClientAuthException
-
createFlowExecution
public org.keycloak.authentication.AuthenticationFlow createFlowExecution(String flowId, org.keycloak.models.AuthenticationExecutionModel execution) -
authenticate
public jakarta.ws.rs.core.Response authenticate() throws org.keycloak.authentication.AuthenticationFlowException- Throws:
org.keycloak.authentication.AuthenticationFlowException
-
authenticateClient
public jakarta.ws.rs.core.Response authenticateClient() throws org.keycloak.authentication.AuthenticationFlowException- Throws:
org.keycloak.authentication.AuthenticationFlowException
-
redirectToFlow
public jakarta.ws.rs.core.Response redirectToFlow() -
resetFlow
public void resetFlow() -
resetFlow
public static void resetFlow(org.keycloak.sessions.AuthenticationSessionModel authSession, String flowPath) -
recreate
public static org.keycloak.sessions.AuthenticationSessionModel recreate(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authSession) -
clone
public static org.keycloak.sessions.AuthenticationSessionModel clone(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authSession) -
authenticationAction
-
authenticateOnly
public jakarta.ws.rs.core.Response authenticateOnly() throws org.keycloak.authentication.AuthenticationFlowException- Throws:
org.keycloak.authentication.AuthenticationFlowException
-
attachSession
public org.keycloak.models.ClientSessionContext attachSession() -
attachSession
public static org.keycloak.models.ClientSessionContext attachSession(org.keycloak.sessions.AuthenticationSessionModel authSession, org.keycloak.models.UserSessionModel userSession, org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.common.ClientConnection connection, org.keycloak.events.EventBuilder event) -
evaluateRequiredActionTriggers
public void evaluateRequiredActionTriggers() -
finishAuthentication
public jakarta.ws.rs.core.Response finishAuthentication(org.keycloak.protocol.LoginProtocol protocol) -
validateUser
public void validateUser(org.keycloak.models.UserModel authenticatedUser) -
authenticationComplete
protected jakarta.ws.rs.core.Response authenticationComplete() -
nextRequiredAction
-
createAuthenticatorContext
public AuthenticationProcessor.Result createAuthenticatorContext(org.keycloak.models.AuthenticationExecutionModel model, org.keycloak.authentication.Authenticator authenticator, List<org.keycloak.models.AuthenticationExecutionModel> executions) -
createClientAuthenticatorContext
public AuthenticationProcessor.Result createClientAuthenticatorContext(org.keycloak.models.AuthenticationExecutionModel model, org.keycloak.authentication.ClientAuthenticator clientAuthenticator, List<org.keycloak.models.AuthenticationExecutionModel> executions)
-