Class LdapClientContext

java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.opendj.rest2ldap.LdapClientContext
All Implemented Interfaces:
org.forgerock.services.context.Context

public final class LdapClientContext extends org.forgerock.services.context.AbstractContext
A Context containing an LdapClient, which will be used for reading the LDAP schema from the server, and an LdapClientSocket which will be used for performing LDAP requests on behalf of the authenticated user. This context is created while performing HTTP authentication in an HTTP servlet filter. It is the responsibility of the component which acquired the LDAP client socket to release it once processing has completed.
  • Field Summary

    Fields inherited from class org.forgerock.services.context.AbstractContext

    data
  • Constructor Summary

    Constructors
    Constructor
    Description
    LdapClientContext(org.forgerock.services.context.Context parent, LdapClient ldapClientForReadingSchema, LdapClientSocket ldapClientSocketForUserRequests)
    Creates a new LDAP client context having the provided parent and an ID automatically generated using UUID.randomUUID().
    LdapClientContext(org.forgerock.services.context.Context parent, LdapClient ldapClientForReadingSchema, LdapClientSocket ldapClientSocketForUserRequests, Control proxiedAuthControl)
    Creates a new LDAP client context having the provided parent and an ID automatically generated using UUID.randomUUID().
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the LDAP client socket authenticated using the SecurityContext which will be used for performing subsequent LDAP operations.

    Methods inherited from class org.forgerock.services.context.AbstractContext

    as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LdapClientContext

      public LdapClientContext(org.forgerock.services.context.Context parent, LdapClient ldapClientForReadingSchema, LdapClientSocket ldapClientSocketForUserRequests)
      Creates a new LDAP client context having the provided parent and an ID automatically generated using UUID.randomUUID().
      Parameters:
      parent - The parent context.
      ldapClientForReadingSchema - The LDAP client which will be used for reading the LDAP schema.
      ldapClientSocketForUserRequests - The LDAP socket which will be used for user requests.
    • LdapClientContext

      public LdapClientContext(org.forgerock.services.context.Context parent, LdapClient ldapClientForReadingSchema, LdapClientSocket ldapClientSocketForUserRequests, Control proxiedAuthControl)
      Creates a new LDAP client context having the provided parent and an ID automatically generated using UUID.randomUUID().
      Parameters:
      parent - The parent context.
      ldapClientForReadingSchema - The LDAP client which will be used for reading the LDAP schema.
      ldapClientSocketForUserRequests - The LDAP socket which will be used for user requests.
      proxiedAuthControl - The LDAP proxied auth control to use for all requests but bind
  • Method Details

    • getUserLdapClientSocket

      public LdapClientSocket getUserLdapClientSocket()
      Returns the LDAP client socket authenticated using the SecurityContext which will be used for performing subsequent LDAP operations.
      Returns:
      The LDAP client socket authenticated using the SecurityContext which will be used for performing subsequent LDAP operations.