org.keycloak.broker.oidc.mappers

## Class AdvancedClaimToRoleMapper

- java.lang.Object
- - org.keycloak.broker.provider.AbstractIdentityProviderMapper
  - - org.keycloak.broker.oidc.mappers.AbstractClaimMapper
    - - org.keycloak.broker.oidc.mappers.AdvancedClaimToRoleMapper

- All Implemented Interfaces:
    IdentityProviderMapper, ConfiguredProvider, Provider, ProviderFactory<IdentityProviderMapper>

      public class AdvancedClaimToRoleMapper
      extends AbstractClaimMapper

  Version:
    $Revision: 1 $
  Author:
    Bill Burke, Benjamin Weimer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ARE_CLAIM_VALUES_REGEX_PROPERTY_NAME`
    `static String` | `CLAIM_PROPERTY_NAME`
    `static String[]` | `COMPATIBLE_PROVIDERS`
    `static String` | `PROVIDER_ID`

    - ### Fields inherited from class org.keycloak.broker.oidc.mappers.AbstractClaimMapper

      `CLAIM, CLAIM_VALUE`

    - ### Fields inherited from interface org.keycloak.broker.provider.IdentityProviderMapper

      `ANY_PROVIDER, DEFAULT_IDENTITY_PROVIDER_MAPPER_SYNC_MODES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdvancedClaimToRoleMapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `getCompatibleProviders()`
    `List<ProviderConfigProperty>` | `getConfigProperties()`
    `String` | `getDisplayCategory()`
    `String` | `getDisplayType()`
    `String` | `getHelpText()`
    `String` | `getId()`
    `protected boolean` | `hasAllClaimValues(IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)`
    `void` | `importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` Called after UserModel is created for first time for this user.
    `boolean` | `supportsSyncMode(IdentityProviderSyncMode syncMode)`
    `void` | `updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` Called when this user has logged in before and has already been imported.
    `void` | `updateBrokeredUserLegacy(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` Called when this user has logged in before and has already been imported.

    - ### Methods inherited from class org.keycloak.broker.oidc.mappers.AbstractClaimMapper

      `getClaimValue, getClaimValue, getClaimValue, hasClaimValue, valueEquals`

    - ### Methods inherited from class org.keycloak.broker.provider.AbstractIdentityProviderMapper

      `close, create, init, postInit, preprocessFederatedIdentity`

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

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

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `order`

- - ### Field Detail

    - #### CLAIM_PROPERTY_NAME

          public static final String CLAIM_PROPERTY_NAME

      See Also:
        Constant Field Values

    - #### ARE_CLAIM_VALUES_REGEX_PROPERTY_NAME

          public static final String ARE_CLAIM_VALUES_REGEX_PROPERTY_NAME

      See Also:
        Constant Field Values

    - #### COMPATIBLE_PROVIDERS

          public static final String[] COMPATIBLE_PROVIDERS

    - #### PROVIDER_ID

          public static final String PROVIDER_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AdvancedClaimToRoleMapper

          public AdvancedClaimToRoleMapper()

  - ### Method Detail

    - #### supportsSyncMode

          public boolean supportsSyncMode(IdentityProviderSyncMode syncMode)

    - #### getConfigProperties

          public List<ProviderConfigProperty> getConfigProperties()

    - #### getId

          public String getId()

    - #### getCompatibleProviders

          public String[] getCompatibleProviders()

    - #### getDisplayCategory

          public String getDisplayCategory()

    - #### getDisplayType

          public String getDisplayType()

    - #### importNewUser

          public void importNewUser(KeycloakSession session,
                                    RealmModel realm,
                                    UserModel user,
                                    IdentityProviderMapperModel mapperModel,
                                    BrokeredIdentityContext context)

      Description copied from interface: `IdentityProviderMapper`
      Called after UserModel is created for first time for this user. Called after "FirstBrokerLogin" flow
      Specified by:
        `importNewUser` in interface `IdentityProviderMapper`
      Overrides:
        `importNewUser` in class `AbstractIdentityProviderMapper`

    - #### updateBrokeredUserLegacy

          public void updateBrokeredUserLegacy(KeycloakSession session,
                                               RealmModel realm,
                                               UserModel user,
                                               IdentityProviderMapperModel mapperModel,
                                               BrokeredIdentityContext context)

      Description copied from interface: `IdentityProviderMapper`
      Called when this user has logged in before and has already been imported. Legacy behaviour. When updating the mapper to correctly update brokered users in all sync modes, move the old behavior into this method.
      Specified by:
        `updateBrokeredUserLegacy` in interface `IdentityProviderMapper`
      Overrides:
        `updateBrokeredUserLegacy` in class `AbstractIdentityProviderMapper`

    - #### updateBrokeredUser

          public void updateBrokeredUser(KeycloakSession session,
                                         RealmModel realm,
                                         UserModel user,
                                         IdentityProviderMapperModel mapperModel,
                                         BrokeredIdentityContext context)

      Description copied from interface: `IdentityProviderMapper`
      Called when this user has logged in before and has already been imported.
      Specified by:
        `updateBrokeredUser` in interface `IdentityProviderMapper`
      Overrides:
        `updateBrokeredUser` in class `AbstractIdentityProviderMapper`

    - #### getHelpText

          public String getHelpText()

    - #### hasAllClaimValues

          protected boolean hasAllClaimValues(IdentityProviderMapperModel mapperModel,
                                              BrokeredIdentityContext context)

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