org.keycloak.broker.provider

## Class HardcodedRoleMapper

- java.lang.Object
- - org.keycloak.broker.provider.AbstractIdentityProviderMapper
  - - org.keycloak.broker.provider.HardcodedRoleMapper

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

      public class HardcodedRoleMapper
      extends AbstractIdentityProviderMapper

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String[]` | `COMPATIBLE_PROVIDERS`
    `protected static List<ProviderConfigProperty>` | `configProperties`
    `static String` | `PROVIDER_ID`

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

      `ANY_PROVIDER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HardcodedRoleMapper()`

  - ### 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()`
    `void` | `importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` Called after UserModel is created for first time for this user.
    `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.

    - ### 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`

- - ### Field Detail

    - #### configProperties

          protected static final List<ProviderConfigProperty> configProperties

    - #### COMPATIBLE_PROVIDERS

          public static final String[] COMPATIBLE_PROVIDERS

    - #### PROVIDER_ID

          public static final String PROVIDER_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HardcodedRoleMapper

          public HardcodedRoleMapper()

  - ### Method Detail

    - #### getConfigProperties

          public List<ProviderConfigProperty> getConfigProperties()

    - #### getDisplayCategory

          public String getDisplayCategory()

    - #### getDisplayType

          public String getDisplayType()

    - #### getId

          public String getId()

    - #### getCompatibleProviders

          public String[] getCompatibleProviders()

    - #### 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`

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

    - #### getHelpText

          public String getHelpText()

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