org.keycloak.models

## Interface UserFederationProviderFactory

- All Superinterfaces:
    ProviderFactory<UserFederationProvider>
  All Known Implementing Classes:
    BasePropertiesFederationFactory, ClasspathPropertiesFederationFactory, DummyUserFederationProviderFactory, FilePropertiesFederationFactory, LDAPFederationProviderFactory

      public interface UserFederationProviderFactory
      extends ProviderFactory<UserFederationProvider>

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `void` | `syncAllUsers(KeycloakSessionFactory sessionFactory, String realmId, UserFederationProviderModel model)` Sync all users from the provider storage to Keycloak storage.
    `void` | `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, create, init`

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

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

      Sync all users from the provider storage to Keycloak storage.
      Parameters:
        `sessionFactory` -
        `realmId` -
        `model` -

    - #### syncChangedUsers

          void 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 (For example LDAP supports tracking of added / updated users, but not removed users. So removed users are not synced)
      Parameters:
        `sessionFactory` -
        `realmId` -
        `model` -
        `lastSync` -

Copyright © 2015. All Rights Reserved.