org.keycloak.broker.provider

## Interface IdentityProviderMapper

- All Superinterfaces:
    ConfiguredProvider, Provider, ProviderFactory<IdentityProviderMapper>
  All Known Implementing Classes:
    AbstractClaimMapper, AbstractIdentityProviderMapper, AbstractJsonUserAttributeMapper, AttributeToRoleMapper, ClaimToRoleMapper, ExternalKeycloakRoleToRoleMapper, FacebookUserAttributeMapper, GitHubUserAttributeMapper, GoogleUserAttributeMapper, HardcodedAttributeMapper, HardcodedRoleMapper, HardcodedUserSessionAttributeMapper, LinkedInUserAttributeMapper, MicrosoftUserAttributeMapper, StackoverflowUserAttributeMapper, UserAttributeMapper, UserAttributeMapper, UsernameTemplateMapper, UsernameTemplateMapper

      public interface IdentityProviderMapper
      extends Provider, ProviderFactory<IdentityProviderMapper>, ConfiguredProvider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ANY_PROVIDER`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `getCompatibleProviders()`
    `String` | `getDisplayCategory()`
    `String` | `getDisplayType()`
    `void` | `importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` Called after UserModel is created for first time for this user.
    `void` | `preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)` Called to determine what keycloak username and email to use to process the login request from the external IDP.
    `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 interface org.keycloak.provider.Provider

      `close`

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

      `close, create, getId, init, postInit`

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

      `getConfigProperties, getHelpText`

- - ### Field Detail

    - #### ANY_PROVIDER

          static final String ANY_PROVIDER

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getCompatibleProviders

          String[] getCompatibleProviders()

    - #### getDisplayCategory

          String getDisplayCategory()

    - #### getDisplayType

          String getDisplayType()

    - #### preprocessFederatedIdentity

          void preprocessFederatedIdentity(KeycloakSession session,
                                           RealmModel realm,
                                           IdentityProviderMapperModel mapperModel,
                                           BrokeredIdentityContext context)

      Called to determine what keycloak username and email to use to process the login request from the external IDP. It's called before "FirstBrokerLogin" flow, so can be used to map attributes to BrokeredIdentityContext ( BrokeredIdentityContext.setUserAttribute ), which will be available on "Review Profile" page and in authenticators during FirstBrokerLogin flow
      Parameters:
        `session` -
        `realm` -
        `mapperModel` -
        `context` -

    - #### importNewUser

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

      Called after UserModel is created for first time for this user. Called after "FirstBrokerLogin" flow
      Parameters:
        `session` -
        `realm` -
        `user` -
        `mapperModel` -
        `context` -

    - #### updateBrokeredUser

          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.
      Parameters:
        `session` -
        `realm` -
        `user` -
        `mapperModel` -
        `context` -

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