Interface LDAPStorageMapper

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
AbstractLDAPStorageMapper, CertificateLDAPStorageMapper, FullNameLDAPStorageMapper, GroupLDAPStorageMapper, HardcodedAttributeMapper, HardcodedLDAPAttributeMapper, HardcodedLDAPGroupStorageMapper, HardcodedLDAPRoleStorageMapper, MSADLDSUserAccountControlStorageMapper, MSADUserAccountControlStorageMapper, RoleLDAPStorageMapper, UserAttributeLDAPStorageMapper

public interface LDAPStorageMapper extends Provider
Marek Posolda
  • Method Details

    • syncDataFromFederationProviderToKeycloak

      SynchronizationResult syncDataFromFederationProviderToKeycloak(RealmModel realm)
      Sync data from federated storage to Keycloak. It's useful just if mapper needs some data preloaded from federated storage (For example load roles from federated provider and sync them to Keycloak database) Applicable just if sync is supported
    • syncDataFromKeycloakToFederationProvider

      SynchronizationResult syncDataFromKeycloakToFederationProvider(RealmModel realm)
      Sync data from Keycloak back to federated storage
    • getGroupMembers

      List<UserModel> getGroupMembers(RealmModel realm, GroupModel group, int firstResult, int maxResults)
      Return empty list if doesn't support storing of groups
    • getRoleMembers

      List<UserModel> getRoleMembers(RealmModel realm, RoleModel role, int firstResult, int maxResults)
      Return empty list if doesn't support storing of roles
      realm -
      role -
      firstResult -
      maxResults -
    • onImportUserFromLDAP

      void onImportUserFromLDAP(LDAPObject ldapUser, UserModel user, RealmModel realm, boolean isCreate)
      Called when importing user from LDAP to local keycloak DB.
      ldapUser -
      user -
      realm -
      isCreate - true if we importing new user from LDAP. False if user already exists in Keycloak, but we are upgrading (syncing) it from LDAP
    • onRegisterUserToLDAP

      void onRegisterUserToLDAP(LDAPObject ldapUser, UserModel localUser, RealmModel realm)
      Called when register new user to LDAP - just after user was created in Keycloak DB
      ldapUser -
      localUser -
      realm -
    • mandatoryAttributeNames

      Set<String> mandatoryAttributeNames()
      Method that returns the mandatory attributes that this mapper imposes on the entry.
      The list of mandatory attributes or null
    • proxy

      UserModel proxy(LDAPObject ldapUser, UserModel delegate, RealmModel realm)
      Called when invoke proxy on LDAP federation provider
      ldapUser -
      delegate -
      realm -
    • beforeLDAPQuery

      void beforeLDAPQuery(LDAPQuery query)
      Called before LDAP Identity query for retrieve LDAP users was executed. It allows to change query somehow (add returning attributes from LDAP, change conditions etc)
      query -
    • onAuthenticationFailure

      boolean onAuthenticationFailure(LDAPObject ldapUser, UserModel user, AuthenticationException ldapException, RealmModel realm)
      Called when LDAP authentication of specified user fails. If any mapper returns true from this method, AuthenticationException won't be rethrown!
      user -
      ldapUser -
      ldapException -
      true if mapper processed the AuthenticationException and did some actions based on that. In that case, AuthenticationException won't be rethrown!
    • getLdapProvider

      LDAPStorageProvider getLdapProvider()
      Gets the ldap provider associated to the mapper.