org.keycloak.federation.ldap

## Class LDAPFederationProviderFactory

- java.lang.Object
- - org.keycloak.federation.ldap.LDAPFederationProviderFactory

- All Implemented Interfaces:
    UserFederationProviderFactory, ProviderFactory<UserFederationProvider>

      public class LDAPFederationProviderFactory
      extends Object
      implements UserFederationProviderFactory

  Version:
    $Revision: 1 $
  Author:
    Marek Posolda, Bill Burke

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDAPFederationProviderFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `UserFederationProvider` | `create(KeycloakSession session)`
    `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.
    `LDAPFederationProvider` | `getInstance(KeycloakSession session, UserFederationProviderModel model)` called per Keycloak transaction.
    `protected void` | `importPicketlinkUsers(KeycloakSession session, String realmId, UserFederationProviderModel fedModel, List<org.picketlink.idm.model.basic.User> users)`
    `void` | `init(Config.Scope config)`
    `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.
    `protected void` | `syncImpl(KeycloakSessionFactory sessionFactory, org.picketlink.idm.query.IdentityQuery<org.picketlink.idm.model.basic.User> userQuery, String realmId, UserFederationProviderModel fedModel)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROVIDER_NAME

          public static final String PROVIDER_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LDAPFederationProviderFactory

          public LDAPFederationProviderFactory()

  - ### Method Detail

    - #### create

          public UserFederationProvider create(KeycloakSession session)

      Specified by:
        `create` in interface `ProviderFactory<UserFederationProvider>`

    - #### getInstance

          public LDAPFederationProvider getInstance(KeycloakSession session,
                                           UserFederationProviderModel model)

      Description copied from interface: `UserFederationProviderFactory`
      called per Keycloak transaction.
      Specified by:
        `getInstance` in interface `UserFederationProviderFactory`
      Returns:

    - #### init

          public void init(Config.Scope config)

      Specified by:
        `init` in interface `ProviderFactory<UserFederationProvider>`

    - #### close

          public void close()

      Specified by:
        `close` in interface `ProviderFactory<UserFederationProvider>`

    - #### getId

          public String getId()

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

    - #### getConfigurationOptions

          public Set<String> getConfigurationOptions()

      Description copied from interface: `UserFederationProviderFactory`
      Config options to display in generic admin console page for federation
      Specified by:
        `getConfigurationOptions` in interface `UserFederationProviderFactory`
      Returns:

    - #### syncAllUsers

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

      Description copied from interface: `UserFederationProviderFactory`
      Sync all users from the provider storage to Keycloak storage.
      Specified by:
        `syncAllUsers` in interface `UserFederationProviderFactory`

    - #### syncChangedUsers

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

      Description copied from interface: `UserFederationProviderFactory`
      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)
      Specified by:
        `syncChangedUsers` in interface `UserFederationProviderFactory`

    - #### syncImpl

          protected void syncImpl(KeycloakSessionFactory sessionFactory,
                      org.picketlink.idm.query.IdentityQuery<org.picketlink.idm.model.basic.User> userQuery,
                      String realmId,
                      UserFederationProviderModel fedModel)

    - #### importPicketlinkUsers

          protected void importPicketlinkUsers(KeycloakSession session,
                                   String realmId,
                                   UserFederationProviderModel fedModel,
                                   List<org.picketlink.idm.model.basic.User> users)

Copyright © 2015. All Rights Reserved.