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.AbstractClaimToRoleMapper
      - - org.keycloak.broker.oidc.mappers.AdvancedClaimToRoleMapper

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

      public class AdvancedClaimToRoleMapper
      extends AbstractClaimToRoleMapper

  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
    --- | ---
    `protected boolean` | `applies(IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` This method must be implemented by subclasses and they must return `true` if their mapping can be applied (i.e.
    `String[]` | `getCompatibleProviders()`
    `List<ProviderConfigProperty>` | `getConfigProperties()`
    `String` | `getDisplayCategory()`
    `String` | `getDisplayType()`
    `String` | `getHelpText()`
    `String` | `getId()`
    `boolean` | `supportsSyncMode(IdentityProviderSyncMode syncMode)`

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

      `importNewUser, updateBrokeredUser, updateBrokeredUserLegacy`

    - ### 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()

    - #### getHelpText

          public String getHelpText()

    - #### applies

          protected boolean applies(IdentityProviderMapperModel mapperModel,
                                    BrokeredIdentityContext context)

      Description copied from class: `AbstractClaimToRoleMapper`
      This method must be implemented by subclasses and they must return `true` if their mapping can be applied (i.e. user has the OIDC claim that should be mapped) or `false` otherwise.
      Specified by:
        `applies` in class `AbstractClaimToRoleMapper`
      Parameters:
        `mapperModel` - a reference to the `IdentityProviderMapperModel`.
        `context` - a reference to the `BrokeredIdentityContext`.
      Returns:
        `true` if the mapping can be applied or `false` otherwise.*

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