Class HardcodedLDAPAttributeMapper

    • Field Detail

      • RANDOM_ATTRIBUTE_VALUE

        public static final String RANDOM_ATTRIBUTE_VALUE
        When this is configured as LDAP_ATTRIBUTE_VALUE, the mapper will use randomly generated value
        See Also:
        Constant Field Values
      • substitution

        public static Pattern substitution
    • Method Detail

      • onRegisterUserToLDAP

        public void onRegisterUserToLDAP​(LDAPObject ldapUser,
                                         UserModel localUser,
                                         RealmModel realm)
        Description copied from interface: LDAPStorageMapper
        Called when register new user to LDAP - just after user was created in Keycloak DB
      • getRandomValue

        protected String getRandomValue()
      • 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
      • beforeLDAPQuery

        public void beforeLDAPQuery​(LDAPQuery query)
        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)