org.keycloak.models

## Interface UserFederationProviderFactory

- All Superinterfaces:
    ProviderFactory<UserFederationProvider>
  All Known Subinterfaces:
    UserFederationValidatingProviderFactory
  All Known Implementing Classes:
    KerberosFederationProviderFactory, LDAPFederationProviderFactory, UserFederationEventAwareProviderFactory

      public interface UserFederationProviderFactory
      extends ProviderFactory<UserFederationProvider>

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `UserFederationProvider` | `create(KeycloakSession session)` This method is never called and is only an artifact of ProviderFactory.
    `Set<String>` | `getConfigurationOptions()` Config options to display in generic admin console page for federation
    `String` | `getId()` This is the name of the provider and will be showed in the admin console as an option.
    `UserFederationProvider` | `getInstance(KeycloakSession session, UserFederationProviderModel model)` called per Keycloak transaction.
    `UserFederationSyncResult` | `syncAllUsers(KeycloakSessionFactory sessionFactory, String realmId, UserFederationProviderModel model)` Sync all users from the provider storage to Keycloak storage.
    `UserFederationSyncResult` | `syncChangedUsers(KeycloakSessionFactory sessionFactory, String realmId, UserFederationProviderModel model, Date lastSync)` Sync just changed (added / updated / removed) users from the provider storage to Keycloak storage.

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

      `close, init, postInit`

- - ### Method Detail

    - #### getInstance

          UserFederationProvider getInstance(KeycloakSession session,
                                             UserFederationProviderModel model)

      called per Keycloak transaction.
      Parameters:
        `session` -
        `model` -
      Returns:

    - #### getConfigurationOptions

          Set<String> getConfigurationOptions()

      Config options to display in generic admin console page for federation
      Returns:

    - #### getId

          String getId()

      This is the name of the provider and will be showed in the admin console as an option.
      Specified by:
        `getId` in interface `ProviderFactory<UserFederationProvider>`
      Returns:

    - #### syncAllUsers

          UserFederationSyncResult syncAllUsers(KeycloakSessionFactory sessionFactory,
                                                String realmId,
                                                UserFederationProviderModel model)

      Sync all users from the provider storage to Keycloak storage. Alternatively can update existing users or remove keycloak users, which are no longer available in federation storage (depends on the implementation)
      Parameters:
        `sessionFactory` -
        `realmId` -
        `model` -
      Returns:
        result with count of added/updated/removed users

    - #### syncChangedUsers

          UserFederationSyncResult syncChangedUsers(KeycloakSessionFactory sessionFactory,
                                                    String realmId,
                                                    UserFederationProviderModel model,
                                                    Date lastSync)

      Sync just changed (added / updated / removed) users from the provider storage to Keycloak storage. This is useful in case that your storage supports "changelogs" (Tracking what users changed since specified date). It's implementation specific to decide what exactly will be changed
      Parameters:
        `sessionFactory` -
        `realmId` -
        `model` -
        `lastSync` -

    - #### create

          UserFederationProvider create(KeycloakSession session)

      This method is never called and is only an artifact of ProviderFactory. Returning null with no implementation is recommended.
      Specified by:
        `create` in interface `ProviderFactory<UserFederationProvider>`
      Parameters:
        `session` -
      Returns:

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