Class AuthenticationProcessor

    • Field Detail

      • 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 javax.ws.rs.core.UriInfo uriInfo
      • session

        protected org.keycloak.models.KeycloakSession session
      • event

        protected org.keycloak.events.EventBuilder event
      • request

        protected org.jboss.resteasy.spi.HttpRequest request
      • flowId

        protected String flowId
      • flowPath

        protected String flowPath
      • browserFlow

        protected boolean browserFlow
      • protector

        protected org.keycloak.services.managers.BruteForceProtector protector
      • afterResetListener

        protected Runnable afterResetListener
      • forwardedErrorMessageStore

        protected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStore forwardedErrorMessageStore
        This could be an error message forwarded from another authenticator
      • forwardedSuccessMessageStore

        protected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStore forwardedSuccessMessageStore
        This could be an success message forwarded from another authenticator
      • forwardedInfoMessageStore

        protected org.keycloak.authentication.AuthenticationProcessor.ForwardedFormMessageStore forwardedInfoMessageStore
        This could be an success message forwarded from another authenticator
      • client

        protected org.keycloak.models.ClientModel client
      • clientAuthAttributes

        protected Map<String,​String> clientAuthAttributes
    • Constructor Detail

      • AuthenticationProcessor

        public AuthenticationProcessor()
    • Method Detail

      • isBrowserFlow

        public boolean isBrowserFlow()
      • 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

        public Map<String,​String> getClientAuthAttributes()
      • getAuthenticationSession

        public org.keycloak.sessions.AuthenticationSessionModel getAuthenticationSession()
      • getConnection

        public org.keycloak.common.ClientConnection getConnection()
      • getUriInfo

        public javax.ws.rs.core.UriInfo getUriInfo()
      • getSession

        public org.keycloak.models.KeycloakSession getSession()
      • getUserSession

        public org.keycloak.models.UserSessionModel getUserSession()
      • setAuthenticationSession

        public AuthenticationProcessor setAuthenticationSession​(org.keycloak.sessions.AuthenticationSessionModel authenticationSession)
      • setConnection

        public AuthenticationProcessor setConnection​(org.keycloak.common.ClientConnection connection)
      • setEventBuilder

        public AuthenticationProcessor setEventBuilder​(org.keycloak.events.EventBuilder eventBuilder)
      • setFlowPath

        public AuthenticationProcessor setFlowPath​(String flowPath)
        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

        public String generateCode()
      • newEvent

        public org.keycloak.events.EventBuilder newEvent()
      • getEvent

        public org.keycloak.events.EventBuilder getEvent()
      • getRequest

        public org.jboss.resteasy.spi.HttpRequest getRequest()
      • getFlowPath

        public String getFlowPath()
      • setAutheticatedUser

        public void setAutheticatedUser​(org.keycloak.models.UserModel user)
      • clearAuthenticatedUser

        public void clearAuthenticatedUser()
      • getRefreshUrl

        public URI getRefreshUrl​(boolean authSessionIdParam)
      • logFailure

        public void logFailure()
      • isSuccessful

        public boolean isSuccessful​(org.keycloak.models.AuthenticationExecutionModel model)
      • handleBrowserExceptionList

        public javax.ws.rs.core.Response handleBrowserExceptionList​(org.keycloak.authentication.AuthenticationFlowException e)
      • handleBrowserException

        public javax.ws.rs.core.Response handleBrowserException​(Exception failure)
      • handleClientAuthException

        public javax.ws.rs.core.Response handleClientAuthException​(Exception failure)
      • createFlowExecution

        public org.keycloak.authentication.AuthenticationFlow createFlowExecution​(String flowId,
                                                                                  org.keycloak.models.AuthenticationExecutionModel execution)
      • authenticate

        public javax.ws.rs.core.Response authenticate()
                                               throws org.keycloak.authentication.AuthenticationFlowException
        Throws:
        org.keycloak.authentication.AuthenticationFlowException
      • authenticateClient

        public javax.ws.rs.core.Response authenticateClient()
                                                     throws org.keycloak.authentication.AuthenticationFlowException
        Throws:
        org.keycloak.authentication.AuthenticationFlowException
      • redirectToFlow

        public javax.ws.rs.core.Response redirectToFlow()
      • resetFlow

        public void resetFlow()
      • resetFlow

        public static void resetFlow​(org.keycloak.sessions.AuthenticationSessionModel authSession,
                                     String flowPath)
      • clone

        public static org.keycloak.sessions.AuthenticationSessionModel clone​(org.keycloak.models.KeycloakSession session,
                                                                             org.keycloak.sessions.AuthenticationSessionModel authSession)
      • authenticationAction

        public javax.ws.rs.core.Response authenticationAction​(String execution)
      • authenticateOnly

        public javax.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 javax.ws.rs.core.Response finishAuthentication​(org.keycloak.protocol.LoginProtocol protocol)
      • validateUser

        public void validateUser​(org.keycloak.models.UserModel authenticatedUser)
      • authenticationComplete

        protected javax.ws.rs.core.Response authenticationComplete()
      • nextRequiredAction

        public String 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)