Class FullNameLDAPStorageMapper
java.lang.Object
org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
org.keycloak.storage.ldap.mappers.FullNameLDAPStorageMapper
- All Implemented Interfaces:
Provider
,LDAPStorageMapper
Mapper useful for the LDAP deployments when some attribute (usually CN) is mapped to full name of user
- Author:
- Marek Posolda
-
Field Summary
Fields inherited from class org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
ldapProvider, mapperModel, session
-
Constructor Summary
ConstructorDescriptionFullNameLDAPStorageMapper
(ComponentModel mapperModel, LDAPStorageProvider ldapProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeLDAPQuery
(LDAPQuery query) Called before LDAP Identity query for retrieve LDAP users was executed.protected String
getFullNameForWriteToLDAP
(String firstName, String lastName, String username) protected String
Method that returns user model attributes, which this mapper maps to Keycloak usersvoid
onImportUserFromLDAP
(LDAPObject ldapUser, UserModel user, RealmModel realm, boolean isCreate) Called when importing user from LDAP to local keycloak DB.void
onRegisterUserToLDAP
(LDAPObject ldapUser, UserModel localUser, RealmModel realm) Called when register new user to LDAP - just after user was created in Keycloak DBproxy
(LDAPObject ldapUser, UserModel delegate, RealmModel realm) Called when invoke proxy on LDAP federation providerMethods inherited from class org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
close, getGroupMembers, getLdapProvider, getRoleMembers, mandatoryAttributeNames, onAuthenticationFailure, parseBooleanParameter, syncDataFromFederationProviderToKeycloak, syncDataFromKeycloakToFederationProvider
-
Field Details
-
LDAP_FULL_NAME_ATTRIBUTE
- See Also:
-
READ_ONLY
- See Also:
-
WRITE_ONLY
- See Also:
-
-
Constructor Details
-
FullNameLDAPStorageMapper
-
-
Method Details
-
onImportUserFromLDAP
public void onImportUserFromLDAP(LDAPObject ldapUser, UserModel user, RealmModel realm, boolean isCreate) Description copied from interface:LDAPStorageMapper
Called when importing user from LDAP to local keycloak DB.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
Description copied from interface:LDAPStorageMapper
Called when register new user to LDAP - just after user was created in Keycloak DB -
proxy
Description copied from interface:LDAPStorageMapper
Called when invoke proxy on LDAP federation provider- Returns:
-
beforeLDAPQuery
Description copied from interface:LDAPStorageMapper
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) -
getUserAttributes
Description copied from interface:LDAPStorageMapper
Method that returns user model attributes, which this mapper maps to Keycloak users- Specified by:
getUserAttributes
in interfaceLDAPStorageMapper
- Overrides:
getUserAttributes
in classAbstractLDAPStorageMapper
- Returns:
- user model attributes. Returns empty set if not user attributes provided by this mapper. Never returns null.
-
getLdapFullNameAttrName
-
getFullNameForWriteToLDAP
-