org.keycloak.federation.ldap.idm.store.ldap

## Class LDAPIdentityStore

- java.lang.Object
- - org.keycloak.federation.ldap.idm.store.ldap.LDAPIdentityStore

- All Implemented Interfaces:
    IdentityStore

      public class LDAPIdentityStore
      extends Object
      implements IdentityStore

  An IdentityStore implementation backed by an LDAP directory
  Author:
    Shane Bryzak, Anil Saldhana, Pedro Silva

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDAPIdentityStore(LDAPConfig config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(LDAPObject ldapObject)` Persists the specified IdentityType
    `int` | `countQueryResults(LDAPQuery identityQuery)`
    `protected StringBuilder` | `createIdentityTypeSearchFilter(LDAPQuery identityQuery)`
    `protected BasicAttributes` | `extractAttributes(LDAPObject ldapObject, boolean isCreate)`
    `List<LDAPObject>` | `fetchQueryResults(LDAPQuery identityQuery)`
    `LDAPConfig` | `getConfig()` Returns the configuration for this IdentityStore instance
    `protected String` | `getEntryIdentifier(LDAPObject ldapObject)`
    `void` | `remove(LDAPObject ldapObject)` Removes the specified IdentityType
    `void` | `update(LDAPObject ldapObject)` Updates the specified IdentityType
    `void` | `updatePassword(LDAPObject user, String password)` Updates the specified credential value.
    `void` | `validatePassword(LDAPObject user, String password)` Validates the specified credentials.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LDAPIdentityStore

          public LDAPIdentityStore(LDAPConfig config)

  - ### Method Detail

    - #### getConfig

          public LDAPConfig getConfig()

      Description copied from interface: `IdentityStore`
      Returns the configuration for this IdentityStore instance
      Specified by:
        `getConfig` in interface `IdentityStore`
      Returns:

    - #### add

          public void add(LDAPObject ldapObject)

      Description copied from interface: `IdentityStore`
      Persists the specified IdentityType
      Specified by:
        `add` in interface `IdentityStore`

    - #### update

          public void update(LDAPObject ldapObject)

      Description copied from interface: `IdentityStore`
      Updates the specified IdentityType
      Specified by:
        `update` in interface `IdentityStore`

    - #### remove

          public void remove(LDAPObject ldapObject)

      Description copied from interface: `IdentityStore`
      Removes the specified IdentityType
      Specified by:
        `remove` in interface `IdentityStore`

    - #### fetchQueryResults

          public List<LDAPObject> fetchQueryResults(LDAPQuery identityQuery)

      Specified by:
        `fetchQueryResults` in interface `IdentityStore`

    - #### countQueryResults

          public int countQueryResults(LDAPQuery identityQuery)

      Specified by:
        `countQueryResults` in interface `IdentityStore`

    - #### validatePassword

          public void validatePassword(LDAPObject user,
                                       String password)
                                throws AuthenticationException

      Description copied from interface: `IdentityStore`
      Validates the specified credentials.
      Specified by:
        `validatePassword` in interface `IdentityStore`
      Parameters:
        `user` - Keycloak user
        `password` - Ldap password
      Throws:
        `AuthenticationException` - if authentication is not successful

    - #### updatePassword

          public void updatePassword(LDAPObject user,
                                     String password)

      Description copied from interface: `IdentityStore`
      Updates the specified credential value.
      Specified by:
        `updatePassword` in interface `IdentityStore`
      Parameters:
        `user` - Keycloak user
        `password` - Ldap password

    - #### createIdentityTypeSearchFilter

          protected StringBuilder createIdentityTypeSearchFilter(LDAPQuery identityQuery)

    - #### extractAttributes

          protected BasicAttributes extractAttributes(LDAPObject ldapObject,
                                                      boolean isCreate)

    - #### getEntryIdentifier

          protected String getEntryIdentifier(LDAPObject ldapObject)

Copyright © 2016 JBoss by Red Hat. All rights reserved.