Class HttpClientConnectionContext
java.lang.Object
org.forgerock.services.context.AbstractContext
org.opends.server.protocols.http.HttpClientConnectionContext
- All Implemented Interfaces:
org.forgerock.services.context.Context
public final class HttpClientConnectionContext
extends org.forgerock.services.context.AbstractContext
An
HttpClientConnectionContext is created by the HTTP connection handler at the front-end and passes the
unauthenticated HttpClientConnection to the downstream HTTP authentication mechanisms via an
LdapClientSocket adapter. The HTTP authentication mechanisms then authenticate the user and update the
authentication state for the connection. They then use construct an LdapClientContext containing the
authenticated LdapClientSocket which should be used further downstream in the HDAP and RestLdap libraries for
performing LDAP requests on behalf of the user.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback for processing LDAP requests. -
Field Summary
Fields inherited from class org.forgerock.services.context.AbstractContext
data -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientConnectionContext(org.forgerock.services.context.Context parent, ClientConnection clientConnection, HttpClientConnectionContext.RequestHandler requestHandler, ServerContext serverContext) Creates a new HTTP client connection context. -
Method Summary
Modifier and TypeMethodDescriptionReturns theClientConnectionassociated with the HTTP request.Returns anLdapClientSocketview of the underlyingClientConnection.Updates the authorization state of the underlyingClientConnectionso that all subsequent operations will be performed on behalf of the specified user.Methods inherited from class org.forgerock.services.context.AbstractContext
as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString
-
Constructor Details
-
HttpClientConnectionContext
public HttpClientConnectionContext(org.forgerock.services.context.Context parent, ClientConnection clientConnection, HttpClientConnectionContext.RequestHandler requestHandler, ServerContext serverContext) Creates a new HTTP client connection context.- Parameters:
parent- The parent context.clientConnection- The client connection.requestHandler- The request handler.serverContext- The server context.
-
-
Method Details
-
getClientConnection
Returns theClientConnectionassociated with the HTTP request.- Returns:
- The
ClientConnection.
-
getLdapClientSocket
Returns anLdapClientSocketview of the underlyingClientConnection.- Returns:
- an
LdapClientSocketview of the underlyingClientConnection
-
proxyAs
Updates the authorization state of the underlyingClientConnectionso that all subsequent operations will be performed on behalf of the specified user.- Parameters:
userEntry- The user.- Returns:
- This context.
-