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 SummaryFieldsModifier and TypeFieldDescriptionprotected final LDAPStorageProviderprotected final ComponentModelprotected final KeycloakSession
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractLDAPStorageMapper(ComponentModel mapperModel, LDAPStorageProvider ldapProvider) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()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.booleanonAuthenticationFailure(LDAPObject ldapUser, UserModel user, AuthenticationException ldapException, RealmModel realm) Called when LDAP authentication of specified user fails.static booleanparseBooleanParameter(ComponentModel mapperModel, String paramName) Sync data from federated storage to Keycloak.Sync data from Keycloak back to federated storageMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.storage.ldap.mappers.LDAPStorageMapperbeforeLDAPQuery, onImportUserFromLDAP, onRegisterUserToLDAP, proxy
- 
Field Details- 
session
- 
mapperModel
- 
ldapProvider
 
- 
- 
Constructor Details- 
AbstractLDAPStorageMapper
 
- 
- 
Method Details- 
syncDataFromFederationProviderToKeycloakDescription copied from interface:LDAPStorageMapperSync 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:
- syncDataFromFederationProviderToKeycloakin interface- LDAPStorageMapper
 
- 
syncDataFromKeycloakToFederationProviderDescription copied from interface:LDAPStorageMapperSync data from Keycloak back to federated storage- Specified by:
- syncDataFromKeycloakToFederationProviderin interface- LDAPStorageMapper
 
- 
getGroupMemberspublic List<UserModel> getGroupMembers(RealmModel realm, GroupModel group, int firstResult, int maxResults) Description copied from interface:LDAPStorageMapperReturn empty list if doesn't support storing of groups- Specified by:
- getGroupMembersin interface- LDAPStorageMapper
 
- 
getRoleMemberspublic List<UserModel> getRoleMembers(RealmModel realm, RoleModel role, int firstResult, int maxResults) Description copied from interface:LDAPStorageMapperReturn empty list if doesn't support storing of roles- Specified by:
- getRoleMembersin interface- LDAPStorageMapper
- Returns:
 
- 
onAuthenticationFailurepublic boolean onAuthenticationFailure(LDAPObject ldapUser, UserModel user, AuthenticationException ldapException, RealmModel realm) Description copied from interface:LDAPStorageMapperCalled when LDAP authentication of specified user fails. If any mapper returns true from this method, AuthenticationException won't be rethrown!- Specified by:
- onAuthenticationFailurein interface- LDAPStorageMapper
- Returns:
- true if mapper processed the AuthenticationException and did some actions based on that. In that case, AuthenticationException won't be rethrown!
 
- 
mandatoryAttributeNamesDescription copied from interface:LDAPStorageMapperMethod that returns the mandatory attributes that this mapper imposes on the entry.- Specified by:
- mandatoryAttributeNamesin interface- LDAPStorageMapper
- Returns:
- The list of mandatory attributes or null
 
- 
parseBooleanParameter
- 
getLdapProviderDescription copied from interface:LDAPStorageMapperGets the ldap provider associated to the mapper.- Specified by:
- getLdapProviderin interface- LDAPStorageMapper
- Returns:
 
- 
closepublic void close()
 
-