Class FullNameLDAPStorageMapper
- java.lang.Object
-
- org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
-
- org.keycloak.storage.ldap.mappers.FullNameLDAPStorageMapper
-
- All Implemented Interfaces:
Provider,LDAPStorageMapper
public class FullNameLDAPStorageMapper extends AbstractLDAPStorageMapper
Mapper useful for the LDAP deployments when some attribute (usually CN) is mapped to full name of user- Author:
- Marek Posolda
-
-
Field Summary
Fields Modifier and Type Field Description static StringLDAP_FULL_NAME_ATTRIBUTEstatic StringREAD_ONLYstatic StringWRITE_ONLY-
Fields inherited from class org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
ldapProvider, mapperModel, session
-
-
Constructor Summary
Constructors Constructor Description FullNameLDAPStorageMapper(ComponentModel mapperModel, LDAPStorageProvider ldapProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeLDAPQuery(LDAPQuery query)Called before LDAP Identity query for retrieve LDAP users was executed.protected StringgetFullNameForWriteToLDAP(String firstName, String lastName, String username)protected StringgetLdapFullNameAttrName()voidonImportUserFromLDAP(LDAPObject ldapUser, UserModel user, RealmModel realm, boolean isCreate)Called when importing user from LDAP to local keycloak DB.voidonRegisterUserToLDAP(LDAPObject ldapUser, UserModel localUser, RealmModel realm)Called when register new user to LDAP - just after user was created in Keycloak DBUserModelproxy(LDAPObject ldapUser, UserModel delegate, RealmModel realm)Called when invoke proxy on LDAP federation provider-
Methods inherited from class org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
close, getGroupMembers, getLdapProvider, getRoleMembers, mandatoryAttributeNames, onAuthenticationFailure, parseBooleanParameter, syncDataFromFederationProviderToKeycloak, syncDataFromKeycloakToFederationProvider
-
-
-
-
Field Detail
-
LDAP_FULL_NAME_ATTRIBUTE
public static final String LDAP_FULL_NAME_ATTRIBUTE
- See Also:
- Constant Field Values
-
READ_ONLY
public static final String READ_ONLY
- See Also:
- Constant Field Values
-
WRITE_ONLY
public static final String WRITE_ONLY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FullNameLDAPStorageMapper
public FullNameLDAPStorageMapper(ComponentModel mapperModel, LDAPStorageProvider ldapProvider)
-
-
Method Detail
-
onImportUserFromLDAP
public void onImportUserFromLDAP(LDAPObject ldapUser, UserModel user, RealmModel realm, boolean isCreate)
Description copied from interface:LDAPStorageMapperCalled 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
public void onRegisterUserToLDAP(LDAPObject ldapUser, UserModel localUser, RealmModel realm)
Description copied from interface:LDAPStorageMapperCalled when register new user to LDAP - just after user was created in Keycloak DB
-
proxy
public UserModel proxy(LDAPObject ldapUser, UserModel delegate, RealmModel realm)
Description copied from interface:LDAPStorageMapperCalled when invoke proxy on LDAP federation provider- Returns:
-
beforeLDAPQuery
public void beforeLDAPQuery(LDAPQuery query)
Description copied from interface:LDAPStorageMapperCalled before LDAP Identity query for retrieve LDAP users was executed. It allows to change query somehow (add returning attributes from LDAP, change conditions etc)
-
getLdapFullNameAttrName
protected String getLdapFullNameAttrName()
-
-