Package org.opends.server.protocols.http
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 interface
Callback 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 theClientConnection
associated with the HTTP request.Returns anLdapClientSocket
view of the underlyingClientConnection
.Updates the authorization state of the underlyingClientConnection
so 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 theClientConnection
associated with the HTTP request.- Returns:
- The
ClientConnection
.
-
getLdapClientSocket
Returns anLdapClientSocket
view of the underlyingClientConnection
.- Returns:
- an
LdapClientSocket
view of the underlyingClientConnection
-
proxyAs
Updates the authorization state of the underlyingClientConnection
so that all subsequent operations will be performed on behalf of the specified user.- Parameters:
userEntry
- The user.- Returns:
- This context.
-