org.keycloak.authentication.authenticators.conditional

## Class ConditionalRoleAuthenticator

- java.lang.Object
- - org.keycloak.authentication.authenticators.conditional.ConditionalRoleAuthenticator

- All Implemented Interfaces:
    Authenticator, ConditionalAuthenticator, Provider

      public class ConditionalRoleAuthenticator
      extends Object
      implements ConditionalAuthenticator

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ConditionalRoleAuthenticator` | `SINGLETON`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConditionalRoleAuthenticator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `action(AuthenticationFlowContext context)` Called from a form action invocation.
    `void` | `close()`
    `boolean` | `matchCondition(AuthenticationFlowContext context)`
    `boolean` | `requiresUser()` Does this authenticator require that the user has already been identified? That AuthenticatorContext.getUser() is not null?
    `void` | `setRequiredActions(KeycloakSession session, RealmModel realm, UserModel user)` Set actions to configure authenticator

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

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

    - ### Methods inherited from interface org.keycloak.authentication.authenticators.conditional.ConditionalAuthenticator

      `authenticate, configuredFor`

    - ### Methods inherited from interface org.keycloak.authentication.Authenticator

      `areRequiredActionsEnabled, getRequiredActions`

- - ### Field Detail

    - #### SINGLETON

          public static final ConditionalRoleAuthenticator SINGLETON

  - ### Constructor Detail

    - #### ConditionalRoleAuthenticator

          public ConditionalRoleAuthenticator()

  - ### Method Detail

    - #### matchCondition

          public boolean matchCondition(AuthenticationFlowContext context)

      Specified by:
        `matchCondition` in interface `ConditionalAuthenticator`

    - #### action

          public void action(AuthenticationFlowContext context)

      Description copied from interface: `Authenticator`
      Called from a form action invocation.
      Specified by:
        `action` in interface `Authenticator`

    - #### requiresUser

          public boolean requiresUser()

      Description copied from interface: `Authenticator`
      Does this authenticator require that the user has already been identified? That AuthenticatorContext.getUser() is not null?
      Specified by:
        `requiresUser` in interface `Authenticator`
      Returns:

    - #### setRequiredActions

          public void setRequiredActions(KeycloakSession session,
                                         RealmModel realm,
                                         UserModel user)

      Description copied from interface: `Authenticator`
      Set actions to configure authenticator
      Specified by:
        `setRequiredActions` in interface `Authenticator`

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

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