public static class AuthenticationFilter.AuthenticationFilterBuilder extends Object
Builder class that configures an Authentication Framework instance.
Usage:
builder.logger(logger)
.auditApi(auditApi)
.serviceSubject(serviceSubject)
.responseHandler(responseHandler)
.sessionModule(
configureModule(sessionAuthModule)
.requestPolicy(sessionAuthModuleRequestPolicy)
.responsePolicy(sessionAuthModuleResponsePolicy)
.callbackHandler(sessionAuthModuleHandler)
.withSettings(sessionAuthModuleSettings))
.authModules(
configureModule(authModuleOne)
.requestPolicy(authModuleOneRequestPolicy)
.responsePolicy(authModuleOneResponsePolicy)
.callbackHandler(authModuleOneHandler)
.withSettings(authModuleOneSettings),
configureModule(authModuleTwo)
.requestPolicy(authModuleTwoRequestPolicy)
.responsePolicy(authModuleTwoResponsePolicy)
.callbackHandler(authModuleTwoHandler)
.withSettings(authModuleTwoSettings))
.build();
Constructor and Description |
---|
AuthenticationFilterBuilder() |
Modifier and Type | Method and Description |
---|---|
AuthenticationFilter.AuthenticationFilterBuilder |
auditApi(AuditApi auditApi)
Sets the, mandatory,
AuditApi instance that the framework will use to audit the
authentication result of processed requests. |
AuthenticationFilter.AuthenticationFilterBuilder |
authModules(AuthenticationFilter.AuthenticationModuleBuilder... authModuleBuilders)
Sets the authentication modules that will be used to validate requests and secure
response messages.
|
AuthenticationFilter.AuthenticationFilterBuilder |
authModules(List<AuthenticationFilter.AuthenticationModuleBuilder> authModuleBuilders)
Sets the authentication modules that will be used to validate requests and secure
response messages.
|
AuthenticationFilter |
build()
Creates a new
JaspiRuntimeFilter instance based on the configuration provided. |
AuthenticationFilter.AuthenticationFilterBuilder |
logger(org.slf4j.Logger logger)
Sets the logger instance that the framework will use to log debug messages.
|
AuthenticationFilter.AuthenticationFilterBuilder |
named(String name)
Sets the name of the logger instance that the framework should create and use to log
debug messages.
|
AuthenticationFilter.AuthenticationFilterBuilder |
responseHandler(ResponseWriter responseWriter)
Adds an additional response handler instance that adds support for protecting resources
which return responses with non-JSON content types.
|
AuthenticationFilter.AuthenticationFilterBuilder |
serviceSubject(Subject serviceSubject)
Sets the service
Subject that contains credentials, for this framework instance,
that auth modules can use to secure response messages. |
AuthenticationFilter.AuthenticationFilterBuilder |
sessionModule(AuthenticationFilter.AuthenticationModuleBuilder sessionAuthModuleBuilder)
Sets the session authentication module that will be used to validate request sessions
and maintain sessions on response messages.
|
public AuthenticationFilter.AuthenticationFilterBuilder named(String name)
Sets the name of the logger instance that the framework should create and use to log debug messages.
If not set, the name defaults to: AuthenticationFilter.
name
- The name of the Logger
instance.public AuthenticationFilter.AuthenticationFilterBuilder logger(org.slf4j.Logger logger)
Sets the logger instance that the framework will use to log debug messages.
If not set, the name defaults to: AuthenticationFilter.
logger
- The Logger
instance.public AuthenticationFilter.AuthenticationFilterBuilder auditApi(AuditApi auditApi)
AuditApi
instance that the framework will use to audit the
authentication result of processed requests.auditApi
- The AuditApi
instance.public AuthenticationFilter.AuthenticationFilterBuilder serviceSubject(Subject serviceSubject)
Subject
that contains credentials, for this framework instance,
that auth modules can use to secure response messages.serviceSubject
- The service Subject
instance.public AuthenticationFilter.AuthenticationFilterBuilder responseHandler(ResponseWriter responseWriter)
responseWriter
- The ResourceExceptionHandler
instance.public AuthenticationFilter.AuthenticationFilterBuilder sessionModule(AuthenticationFilter.AuthenticationModuleBuilder sessionAuthModuleBuilder)
sessionAuthModuleBuilder
- A AuthenticationModuleBuilder
instance.public AuthenticationFilter.AuthenticationFilterBuilder authModules(AuthenticationFilter.AuthenticationModuleBuilder... authModuleBuilders)
authModuleBuilders
- A AuthenticationModuleBuilder
instance.AuthenticationFilter.AuthenticationFilterBuilder.authModules(java.util.List)
public AuthenticationFilter.AuthenticationFilterBuilder authModules(List<AuthenticationFilter.AuthenticationModuleBuilder> authModuleBuilders)
authModuleBuilders
- A AuthenticationModuleBuilder
instance.#authModules(AuthenticationModuleBuilder...)
public AuthenticationFilter build() throws AuthenticationException
JaspiRuntimeFilter
instance based on the configuration provided.AuthenticationException
- If any auth modules cannot be initialized.IllegalStateException
- If the AuditApi
instance has not been set.Copyright © 2010-2018, ForgeRock All Rights Reserved.