org.keycloak.authentication

## Class AuthenticationProcessor

- java.lang.Object
- - org.keycloak.authentication.AuthenticationProcessor

-     public class AuthenticationProcessor
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AuthenticationProcessor.Result`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `browserFlow`
    `protected ClientModel` | `client`
    `protected Map<String,String>` | `clientAuthAttributes`
    `protected ClientSessionModel` | `clientSession`
    `protected ClientConnection` | `connection`
    `static String` | `CURRENT_AUTHENTICATION_EXECUTION`
    `protected EventBuilder` | `event`
    `protected String` | `flowId`
    `protected String` | `flowPath`
    `protected FormMessage` | `forwardedErrorMessage` This could be an error message forwarded from another authenticator
    `protected FormMessage` | `forwardedSuccessMessage` This could be an success message forwarded from another authenticator
    `protected static ServicesLogger` | `logger`
    `protected boolean` | `oneActionWasSuccessful`
    `protected BruteForceProtector` | `protector`
    `protected RealmModel` | `realm`
    `protected org.jboss.resteasy.spi.HttpRequest` | `request`
    `protected KeycloakSession` | `session`
    `protected javax.ws.rs.core.UriInfo` | `uriInfo`
    `protected UserSessionModel` | `userSession`
    `protected boolean` | `userSessionCreated`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticationProcessor()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attachSession()`
    `javax.ws.rs.core.Response` | `authenticate()`
    `javax.ws.rs.core.Response` | `authenticateClient()`
    `javax.ws.rs.core.Response` | `authenticateOnly()`
    `javax.ws.rs.core.Response` | `authenticationAction(String execution)`
    `protected javax.ws.rs.core.Response` | `authenticationComplete()`
    `void` | `checkClientSession()`
    `javax.ws.rs.core.Response` | `checkWasSuccessfulBrowserAction()`
    `void` | `clearAuthenticatedUser()`
    `static ClientSessionModel` | `clone(KeycloakSession session, ClientSessionModel clientSession)`
    `AuthenticationProcessor.Result` | `createAuthenticatorContext(AuthenticationExecutionModel model, Authenticator authenticator, List<AuthenticationExecutionModel> executions)`
    `AuthenticationProcessor.Result` | `createClientAuthenticatorContext(AuthenticationExecutionModel model, ClientAuthenticator clientAuthenticator, List<AuthenticationExecutionModel> executions)`
    `AuthenticationFlow` | `createFlowExecution(String flowId, AuthenticationExecutionModel execution)`
    `void` | `evaluateRequiredActionTriggers()`
    `javax.ws.rs.core.Response` | `finishAuthentication(LoginProtocol protocol)`
    `String` | `generateCode()`
    `BruteForceProtector` | `getBruteForceProtector()`
    `ClientModel` | `getClient()`
    `Map<String,String>` | `getClientAuthAttributes()`
    `ClientSessionModel` | `getClientSession()`
    `ClientConnection` | `getConnection()`
    `EventBuilder` | `getEvent()`
    `RealmModel` | `getRealm()`
    `org.jboss.resteasy.spi.HttpRequest` | `getRequest()`
    `KeycloakSession` | `getSession()`
    `javax.ws.rs.core.UriInfo` | `getUriInfo()`
    `UserSessionModel` | `getUserSession()`
    `javax.ws.rs.core.Response` | `handleBrowserException(Exception failure)`
    `javax.ws.rs.core.Response` | `handleClientAuthException(Exception failure)`
    `boolean` | `isActionRequired()`
    `boolean` | `isBrowserFlow()`
    `boolean` | `isSuccessful(AuthenticationExecutionModel model)`
    `boolean` | `isUserSessionCreated()`
    `void` | `logFailure()`
    `EventBuilder` | `newEvent()`
    `javax.ws.rs.core.Response` | `redirectToFlow()`
    `static javax.ws.rs.core.Response` | `redirectToRequiredActions(RealmModel realm, ClientSessionModel clientSession, javax.ws.rs.core.UriInfo uriInfo)`
    `static void` | `resetFlow(ClientSessionModel clientSession)`
    `void` | `setActionSuccessful()` Marks that at least one action was successful
    `void` | `setAutheticatedUser(UserModel user)`
    `AuthenticationProcessor` | `setBrowserFlow(boolean browserFlow)`
    `void` | `setClient(ClientModel client)`
    `AuthenticationProcessor` | `setClientSession(ClientSessionModel clientSession)`
    `AuthenticationProcessor` | `setConnection(ClientConnection connection)`
    `AuthenticationProcessor` | `setEventBuilder(EventBuilder eventBuilder)`
    `AuthenticationProcessor` | `setFlowId(String flowId)`
    `AuthenticationProcessor` | `setFlowPath(String flowPath)` This is the path segment to append when generating an action URL.
    `AuthenticationProcessor` | `setForwardedErrorMessage(FormMessage forwardedErrorMessage)`
    `AuthenticationProcessor` | `setForwardedSuccessMessage(FormMessage forwardedSuccessMessage)`
    `AuthenticationProcessor` | `setRealm(RealmModel realm)`
    `AuthenticationProcessor` | `setRequest(org.jboss.resteasy.spi.HttpRequest request)`
    `AuthenticationProcessor` | `setSession(KeycloakSession session)`
    `AuthenticationProcessor` | `setUriInfo(javax.ws.rs.core.UriInfo uriInfo)`
    `void` | `validateUser(UserModel authenticatedUser)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CURRENT_AUTHENTICATION_EXECUTION

          public static final String CURRENT_AUTHENTICATION_EXECUTION

      See Also:
        Constant Field Values

    - #### logger

          protected static final ServicesLogger logger

    - #### realm

          protected RealmModel realm

    - #### userSession

          protected UserSessionModel userSession

    - #### clientSession

          protected ClientSessionModel clientSession

    - #### connection

          protected ClientConnection connection

    - #### uriInfo

          protected javax.ws.rs.core.UriInfo uriInfo

    - #### session

          protected KeycloakSession session

    - #### event

          protected EventBuilder event

    - #### request

          protected org.jboss.resteasy.spi.HttpRequest request

    - #### flowId

          protected String flowId

    - #### flowPath

          protected String flowPath

    - #### browserFlow

          protected boolean browserFlow

    - #### protector

          protected BruteForceProtector protector

    - #### oneActionWasSuccessful

          protected boolean oneActionWasSuccessful

    - #### forwardedErrorMessage

          protected FormMessage forwardedErrorMessage

      This could be an error message forwarded from another authenticator

    - #### forwardedSuccessMessage

          protected FormMessage forwardedSuccessMessage

      This could be an success message forwarded from another authenticator

    - #### userSessionCreated

          protected boolean userSessionCreated

    - #### client

          protected ClientModel client

    - #### clientAuthAttributes

          protected Map<String,String> clientAuthAttributes

  - ### Constructor Detail

    - #### AuthenticationProcessor

          public AuthenticationProcessor()

  - ### Method Detail

    - #### isBrowserFlow

          public boolean isBrowserFlow()

    - #### setBrowserFlow

          public AuthenticationProcessor setBrowserFlow(boolean browserFlow)

    - #### getBruteForceProtector

          public BruteForceProtector getBruteForceProtector()

    - #### getRealm

          public RealmModel getRealm()

    - #### getClient

          public ClientModel getClient()

    - #### setClient

          public void setClient(ClientModel client)

    - #### getClientAuthAttributes

          public Map<String,String> getClientAuthAttributes()

    - #### getClientSession

          public ClientSessionModel getClientSession()

    - #### getConnection

          public ClientConnection getConnection()

    - #### getUriInfo

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

    - #### getSession

          public KeycloakSession getSession()

    - #### getUserSession

          public UserSessionModel getUserSession()

    - #### isUserSessionCreated

          public boolean isUserSessionCreated()

    - #### setRealm

          public AuthenticationProcessor setRealm(RealmModel realm)

    - #### setClientSession

          public AuthenticationProcessor setClientSession(ClientSessionModel clientSession)

    - #### setConnection

          public AuthenticationProcessor setConnection(ClientConnection connection)

    - #### setUriInfo

          public AuthenticationProcessor setUriInfo(javax.ws.rs.core.UriInfo uriInfo)

    - #### setSession

          public AuthenticationProcessor setSession(KeycloakSession session)

    - #### setEventBuilder

          public AuthenticationProcessor setEventBuilder(EventBuilder eventBuilder)

    - #### setRequest

          public AuthenticationProcessor setRequest(org.jboss.resteasy.spi.HttpRequest request)

    - #### setFlowId

          public AuthenticationProcessor setFlowId(String flowId)

    - #### setFlowPath

          public AuthenticationProcessor setFlowPath(String flowPath)

      This is the path segment to append when generating an action URL.
      Parameters:
        `flowPath` -

    - #### setForwardedErrorMessage

          public AuthenticationProcessor setForwardedErrorMessage(FormMessage forwardedErrorMessage)

    - #### setForwardedSuccessMessage

          public AuthenticationProcessor setForwardedSuccessMessage(FormMessage forwardedSuccessMessage)

    - #### generateCode

          public String generateCode()

    - #### newEvent

          public EventBuilder newEvent()

    - #### getEvent

          public EventBuilder getEvent()

    - #### getRequest

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

    - #### setAutheticatedUser

          public void setAutheticatedUser(UserModel user)

    - #### clearAuthenticatedUser

          public void clearAuthenticatedUser()

    - #### logFailure

          public void logFailure()

    - #### isSuccessful

          public boolean isSuccessful(AuthenticationExecutionModel model)

    - #### handleBrowserException

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

    - #### handleClientAuthException

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

    - #### createFlowExecution

          public AuthenticationFlow createFlowExecution(String flowId,
                                                        AuthenticationExecutionModel execution)

    - #### authenticate

          public javax.ws.rs.core.Response authenticate()
                                                 throws AuthenticationFlowException

      Throws:
        `AuthenticationFlowException`

    - #### authenticateClient

          public javax.ws.rs.core.Response authenticateClient()
                                                       throws AuthenticationFlowException

      Throws:
        `AuthenticationFlowException`

    - #### redirectToFlow

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

    - #### redirectToRequiredActions

          public static javax.ws.rs.core.Response redirectToRequiredActions(RealmModel realm,
                                                                            ClientSessionModel clientSession,
                                                                            javax.ws.rs.core.UriInfo uriInfo)

    - #### resetFlow

          public static void resetFlow(ClientSessionModel clientSession)

    - #### clone

          public static ClientSessionModel clone(KeycloakSession session,
                                                 ClientSessionModel clientSession)

    - #### authenticationAction

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

    - #### checkClientSession

          public void checkClientSession()

    - #### authenticateOnly

          public javax.ws.rs.core.Response authenticateOnly()
                                                     throws AuthenticationFlowException

      Throws:
        `AuthenticationFlowException`

    - #### setActionSuccessful

          public void setActionSuccessful()

      Marks that at least one action was successful

    - #### checkWasSuccessfulBrowserAction

          public javax.ws.rs.core.Response checkWasSuccessfulBrowserAction()

    - #### attachSession

          public void attachSession()

    - #### evaluateRequiredActionTriggers

          public void evaluateRequiredActionTriggers()

    - #### finishAuthentication

          public javax.ws.rs.core.Response finishAuthentication(LoginProtocol protocol)

    - #### validateUser

          public void validateUser(UserModel authenticatedUser)

    - #### authenticationComplete

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

    - #### isActionRequired

          public boolean isActionRequired()

    - #### createAuthenticatorContext

          public AuthenticationProcessor.Result createAuthenticatorContext(AuthenticationExecutionModel model,
                                                                           Authenticator authenticator,
                                                                           List<AuthenticationExecutionModel> executions)

    - #### createClientAuthenticatorContext

          public AuthenticationProcessor.Result createClientAuthenticatorContext(AuthenticationExecutionModel model,
                                                                                 ClientAuthenticator clientAuthenticator,
                                                                                 List<AuthenticationExecutionModel> executions)

Copyright © 2016 JBoss by Red Hat. All rights reserved.