Class LdapClientContext

  • All Implemented Interfaces:
    org.forgerock.services.context.Context

    public final class LdapClientContext
    extends org.forgerock.services.context.AbstractContext
    A Context that injects an LDAP connection which will be used for performing subsequent LDAP operations. The LDAP connection is typically acquired while performing authentication in an HTTP servlet filter. It is the responsibility of the component which acquired the connection to release 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 ldapClient, LdapClientSocket socket)
      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 ldapClient, LdapClientSocket socket, Control proxiedAuthControl)
      Creates a new LDAP client context having the provided parent and an ID automatically generated using UUID.randomUUID().
    • Constructor Detail

      • LdapClientContext

        public LdapClientContext​(org.forgerock.services.context.Context parent,
                                 LdapClient ldapClient,
                                 LdapClientSocket socket)
        Creates a new LDAP client context having the provided parent and an ID automatically generated using UUID.randomUUID().
        Parameters:
        parent - The parent context.
        ldapClient - The LDAP client which will be used for performing internal LDAP operations.
        socket - The LDAP socket which will be used for performing subsequent LDAP operations.
      • LdapClientContext

        public LdapClientContext​(org.forgerock.services.context.Context parent,
                                 LdapClient ldapClient,
                                 LdapClientSocket socket,
                                 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.
        ldapClient - The LDAP client which will be used for performing internal LDAP operations.
        socket - The LDAP socket which will be used for performing subsequent LDAP operations.
        proxiedAuthControl - The LDAP proxied auth control to use for all requests but bind
    • Method Detail

      • getLdapClientSocket

        public LdapClientSocket getLdapClientSocket()
        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.