public final class AuthenticationFilter extends Object implements Filter
A HTTP Filter
that will protect all downstream filters or handlers.
The filter instance is created by creating a builder instance, (AuthenticationFilter.builder()
), and
providing the modules and configuration, for the particular authentication framework instance,
that will be used to authenticate incoming requests and outgoing responses.
The authentication framework can be configured with a single session authentication module, which will authenticate requests based on some session identifier, and an ordered list of authentication modules, that are executed in order on a first succeeds wins basis.
The authentication framework must be configured with a non-null
AuditApi
instance, so that it can audit authentication outcomes.
Modifier and Type | Class and Description |
---|---|
static class |
AuthenticationFilter.AuthenticationFilterBuilder
Builder class that configures an Authentication Framework instance.
|
static class |
AuthenticationFilter.AuthenticationModuleBuilder
Builder class that configures
AsyncServerAuthModule s and
ServerAuthModule s. |
Modifier and Type | Method and Description |
---|---|
static AuthenticationFilter.AuthenticationFilterBuilder |
builder()
Returns a new
AuthenticationFilterBuilder instance which is to be used to configure
an instance of the Authentication Framework. |
Promise<Response,NeverThrowsException> |
filter(Context context,
Request request,
Handler next)
Authenticates incoming request messages and if successful calls the downstream filter or
handler and then secures the returned response.
|
String |
toString() |
public Promise<Response,NeverThrowsException> filter(Context context, Request request, Handler next)
filter
in interface Filter
context
- The request context.request
- The request.next
- The downstream filter or handler in the chain that should only be called if the
request was successfully authenticated.Promise
representing the response to be returned to the client.public static AuthenticationFilter.AuthenticationFilterBuilder builder()
AuthenticationFilterBuilder
instance which is to be used to configure
an instance of the Authentication Framework.AuthenticationFilterBuilder
instance.Copyright © 2010-2020, ForgeRock All Rights Reserved.