Class AbstractLDAPStorageMapper
java.lang.Object
org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
- All Implemented Interfaces:
Provider
,LDAPStorageMapper
- Direct Known Subclasses:
FullNameLDAPStorageMapper
,GroupLDAPStorageMapper
,HardcodedAttributeMapper
,HardcodedLDAPAttributeMapper
,HardcodedLDAPGroupStorageMapper
,HardcodedLDAPRoleStorageMapper
,MSADLDSUserAccountControlStorageMapper
,MSADUserAccountControlStorageMapper
,RoleLDAPStorageMapper
,UserAttributeLDAPStorageMapper
Stateful per-request object
- Author:
- Marek Posolda
-
Field Summary
Modifier and TypeFieldDescriptionprotected final LDAPStorageProvider
protected final ComponentModel
protected final KeycloakSession
-
Constructor Summary
ConstructorDescriptionAbstractLDAPStorageMapper
(ComponentModel mapperModel, LDAPStorageProvider ldapProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getGroupMembers
(RealmModel realm, GroupModel group, int firstResult, int maxResults) Return empty list if doesn't support storing of groupsGets the ldap provider associated to the mapper.getRoleMembers
(RealmModel realm, RoleModel role, int firstResult, int maxResults) Return empty list if doesn't support storing of rolesMethod that returns the mandatory attributes that this mapper imposes on the entry.boolean
onAuthenticationFailure
(LDAPObject ldapUser, UserModel user, AuthenticationException ldapException, RealmModel realm) Called when LDAP authentication of specified user fails.static boolean
parseBooleanParameter
(ComponentModel mapperModel, String paramName) Sync data from federated storage to Keycloak.Sync data from Keycloak back to federated storageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.storage.ldap.mappers.LDAPStorageMapper
beforeLDAPQuery, onImportUserFromLDAP, onRegisterUserToLDAP, proxy
-
Field Details
-
session
-
mapperModel
-
ldapProvider
-
-
Constructor Details
-
AbstractLDAPStorageMapper
-
-
Method Details
-
syncDataFromFederationProviderToKeycloak
Description copied from interface:LDAPStorageMapper
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- Specified by:
syncDataFromFederationProviderToKeycloak
in interfaceLDAPStorageMapper
-
syncDataFromKeycloakToFederationProvider
Description copied from interface:LDAPStorageMapper
Sync data from Keycloak back to federated storage- Specified by:
syncDataFromKeycloakToFederationProvider
in interfaceLDAPStorageMapper
-
getGroupMembers
public List<UserModel> getGroupMembers(RealmModel realm, GroupModel group, int firstResult, int maxResults) Description copied from interface:LDAPStorageMapper
Return empty list if doesn't support storing of groups- Specified by:
getGroupMembers
in interfaceLDAPStorageMapper
-
getRoleMembers
public List<UserModel> getRoleMembers(RealmModel realm, RoleModel role, int firstResult, int maxResults) Description copied from interface:LDAPStorageMapper
Return empty list if doesn't support storing of roles- Specified by:
getRoleMembers
in interfaceLDAPStorageMapper
- Returns:
-
onAuthenticationFailure
public boolean onAuthenticationFailure(LDAPObject ldapUser, UserModel user, AuthenticationException ldapException, RealmModel realm) Description copied from interface:LDAPStorageMapper
Called when LDAP authentication of specified user fails. If any mapper returns true from this method, AuthenticationException won't be rethrown!- Specified by:
onAuthenticationFailure
in interfaceLDAPStorageMapper
- Returns:
- true if mapper processed the AuthenticationException and did some actions based on that. In that case, AuthenticationException won't be rethrown!
-
mandatoryAttributeNames
Description copied from interface:LDAPStorageMapper
Method that returns the mandatory attributes that this mapper imposes on the entry.- Specified by:
mandatoryAttributeNames
in interfaceLDAPStorageMapper
- Returns:
- The list of mandatory attributes or null
-
parseBooleanParameter
-
getLdapProvider
Description copied from interface:LDAPStorageMapper
Gets the ldap provider associated to the mapper.- Specified by:
getLdapProvider
in interfaceLDAPStorageMapper
- Returns:
-
close
public void close()
-