public class Rest2LdapHttpApplication extends Object implements org.forgerock.http.HttpApplication
Modifier and Type | Field and Description |
---|---|
protected File |
configDirectory
The name of the JSON configuration directory in which config.json and rest2ldap/rest2ldap.json are located.
|
protected Schema |
schema
Schema used to perform DN validations.
|
Constructor and Description |
---|
Rest2LdapHttpApplication()
Default constructor called by the HTTP Framework which will use the default configuration directory.
|
Rest2LdapHttpApplication(File configDirectory,
Schema schema)
Creates a new Rest2LDAP HTTP application using the provided configuration directory.
|
Modifier and Type | Method and Description |
---|---|
Factory<org.forgerock.http.io.Buffer> |
getBufferFactory() |
protected ConnectionFactory |
getConnectionFactory(String name)
Gets a
ConnectionFactory from its name. |
protected ConditionalFilters.ConditionalFilter |
newAnonymousFilter(ConnectionFactory connectionFactory)
Creates a new
Filter in charge of injecting AuthenticatedConnectionContext directly from a
ConnectionFactory . |
protected ConditionalFilters.ConditionalFilter |
newBasicAuthenticationFilter(AuthenticationStrategy authenticationStrategy,
Function<org.forgerock.http.protocol.Headers,Pair<String,String>,NeverThrowsException> credentialsExtractor)
Gets a
Filter in charge of performing the HTTP-Basic Authentication. |
protected org.forgerock.http.Filter |
newProxyAuthzFilter(ConnectionFactory connectionFactory)
Creates a new
Filter in charge of injecting AuthenticatedConnectionContext . |
org.forgerock.http.Handler |
start() |
void |
stop() |
protected final File configDirectory
protected final Schema schema
public Rest2LdapHttpApplication()
public Rest2LdapHttpApplication(File configDirectory, Schema schema)
configDirectory
- The name of the JSON configuration directory in which config.json and rest2ldap/rest2ldap.json are
located.schema
- The Schema
used to perform DN validationspublic final org.forgerock.http.Handler start() throws org.forgerock.http.HttpApplicationException
start
in interface org.forgerock.http.HttpApplication
org.forgerock.http.HttpApplicationException
public Factory<org.forgerock.http.io.Buffer> getBufferFactory()
getBufferFactory
in interface org.forgerock.http.HttpApplication
public void stop()
stop
in interface org.forgerock.http.HttpApplication
protected org.forgerock.http.Filter newProxyAuthzFilter(ConnectionFactory connectionFactory)
Filter
in charge of injecting AuthenticatedConnectionContext
.connectionFactory
- The ConnectionFactory
providing the Connection
injected as
AuthenticatedConnectionContext
Filter
protected ConditionalFilters.ConditionalFilter newAnonymousFilter(ConnectionFactory connectionFactory)
Filter
in charge of injecting AuthenticatedConnectionContext
directly from a
ConnectionFactory
.connectionFactory
- The ConnectionFactory
used to get the Connection
Filter
protected ConnectionFactory getConnectionFactory(String name)
ConnectionFactory
from its name.name
- Name of the ConnectionFactory
as specified in the configurationConnectionFactory
or null if none can be foundprotected ConditionalFilters.ConditionalFilter newBasicAuthenticationFilter(AuthenticationStrategy authenticationStrategy, Function<org.forgerock.http.protocol.Headers,Pair<String,String>,NeverThrowsException> credentialsExtractor)
Filter
in charge of performing the HTTP-Basic Authentication. This filter create a
SecurityContext
reflecting the authenticated users.authenticationStrategy
- The AuthenticationStrategy
to use to authenticate the user.credentialsExtractor
- Extract the user's credentials from the Headers
.Filter
Copyright 2010-2020 ForgeRock AS.