org.keycloak.authentication.authenticators.broker

## Class IdpCreateUserIfUniqueAuthenticator

- java.lang.Object
- - org.keycloak.authentication.authenticators.broker.AbstractIdpAuthenticator
  - - org.keycloak.authentication.authenticators.broker.IdpCreateUserIfUniqueAuthenticator

- All Implemented Interfaces:
    Authenticator, Provider

      public class IdpCreateUserIfUniqueAuthenticator
      extends AbstractIdpAuthenticator

  Author:
    Marek Posolda

- - ### Field Summary

    - ### Fields inherited from class org.keycloak.authentication.authenticators.broker.AbstractIdpAuthenticator

      `BROKER_REGISTERED_NEW_USER, BROKERED_CONTEXT_NOTE, ENFORCE_UPDATE_PROFILE, EXISTING_USER_INFO, FIRST_BROKER_LOGIN_SUCCESS, NESTED_FIRST_BROKER_CONTEXT, UPDATE_PROFILE_EMAIL_CHANGED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdpCreateUserIfUniqueAuthenticator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `actionImpl(AuthenticationFlowContext context, SerializedBrokeredIdentityContext serializedCtx, BrokeredIdentityContext brokerContext)`
    `protected void` | `authenticateImpl(AuthenticationFlowContext context, SerializedBrokeredIdentityContext serializedCtx, BrokeredIdentityContext brokerContext)`
    `protected ExistingUserInfo` | `checkExistingUser(AuthenticationFlowContext context, String username, SerializedBrokeredIdentityContext serializedCtx, BrokeredIdentityContext brokerContext)`
    `boolean` | `configuredFor(KeycloakSession session, RealmModel realm, UserModel user)` Is this authenticator configured for this user.
    `protected String` | `getUsername(AuthenticationFlowContext context, SerializedBrokeredIdentityContext serializedCtx, BrokeredIdentityContext brokerContext)`
    `boolean` | `requiresUser()` Does this authenticator require that the user has already been identified? That AuthenticatorContext.getUser() is not null?
    `protected void` | `userRegisteredSuccess(AuthenticationFlowContext context, UserModel registeredUser, SerializedBrokeredIdentityContext serializedCtx, BrokeredIdentityContext brokerContext)`

    - ### Methods inherited from class org.keycloak.authentication.authenticators.broker.AbstractIdpAuthenticator

      `action, authenticate, close, getExistingUser, sendFailureChallenge, setRequiredActions`

    - ### 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.Authenticator

      `areRequiredActionsEnabled, getRequiredActions`

- - ### Constructor Detail

    - #### IdpCreateUserIfUniqueAuthenticator

          public IdpCreateUserIfUniqueAuthenticator()

  - ### Method Detail

    - #### actionImpl

          protected void actionImpl(AuthenticationFlowContext context,
                                    SerializedBrokeredIdentityContext serializedCtx,
                                    BrokeredIdentityContext brokerContext)

      Specified by:
        `actionImpl` in class `AbstractIdpAuthenticator`

    - #### authenticateImpl

          protected void authenticateImpl(AuthenticationFlowContext context,
                                          SerializedBrokeredIdentityContext serializedCtx,
                                          BrokeredIdentityContext brokerContext)

      Specified by:
        `authenticateImpl` in class `AbstractIdpAuthenticator`

    - #### checkExistingUser

          protected ExistingUserInfo checkExistingUser(AuthenticationFlowContext context,
                                                       String username,
                                                       SerializedBrokeredIdentityContext serializedCtx,
                                                       BrokeredIdentityContext brokerContext)

    - #### getUsername

          protected String getUsername(AuthenticationFlowContext context,
                                       SerializedBrokeredIdentityContext serializedCtx,
                                       BrokeredIdentityContext brokerContext)

    - #### userRegisteredSuccess

          protected void userRegisteredSuccess(AuthenticationFlowContext context,
                                               UserModel registeredUser,
                                               SerializedBrokeredIdentityContext serializedCtx,
                                               BrokeredIdentityContext brokerContext)

    - #### 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?
      Returns:

    - #### configuredFor

          public boolean configuredFor(KeycloakSession session,
                                       RealmModel realm,
                                       UserModel user)

      Description copied from interface: `Authenticator`
      Is this authenticator configured for this user.
      Returns:

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