Interface SecurityHandlerConfig
- All Superinterfaces:
Prototype.Api, Prototype.Factory<SecurityHandler>
- All Known Implementing Classes:
SecurityHandlerConfig.BuilderBase.SecurityHandlerConfigImpl
Configuration of a
SecurityHandler.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forSecurityHandler.static classSecurityHandlerConfig.BuilderBase<BUILDER extends SecurityHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends SecurityHandlerConfig>Fluent API builder base forSecurityHandlerConfig. -
Method Summary
Modifier and TypeMethodDescriptionaudit()Whether to audit this request - defaults to false, if enabled, request is audited with event type "request".Override for event-type, defaults to "request".Override for audit message format, defaults to "%3$s %1$s \"%2$s\" %5$s %6$s requested by %4$s".If called, request will go through authentication process - defaults to false (even if authorize is true).If called, authentication failure will not abort request and will continue as anonymous (defaults to false).Use a named authenticator (as supported by security - if not defined, default authenticator is used).Enable authorization for this route.Use a named authorizer (as supported by security - if not defined, default authorizer is used, if none defined, all is permitted).builder()Create a new fluent API builder to customize configuration.builder(SecurityHandlerConfig instance) Create a new fluent API builder from an existing instance.booleancombined()Whether this is a combined handler.config()Configuration associated with this security handler.static SecurityHandlerConfigcreate()Create a new instance with default values.static SecurityHandlerConfigCreate a new instance from configuration.A store of custom objects, that can be used to customize specific security providers.Query parameter handler(s).An array of allowed roles for this path - must have a security provider supporting roles (either authentication or authorization provider).sockets()List of sockets this configuration should be applied to.Methods inherited from interface Prototype.Factory
buildModifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
rolesAllowed
An array of allowed roles for this path - must have a security provider supporting roles (either authentication or authorization provider). This method enables authentication and authorization (you can disable them again by callingSecurityHandler.skipAuthorization()andauthenticationOptional()if needed).- Returns:
- if subject is any of these roles, allow access
-
authenticator
-
authorizer
-
authenticate
-
authenticationOptional
-
audit
-
authorize
-
auditEventType
-
auditMessageFormat
-
queryParams
List<SecurityHandler.QueryParamHandler> queryParams()Query parameter handler(s).- Returns:
- query parameters
-
customObjects
Optional<ClassToInstanceStore<Object>> customObjects()A store of custom objects, that can be used to customize specific security providers.- Returns:
- custom objects
-
sockets
-
config
-
combined
boolean combined()Whether this is a combined handler. Internal use.- Returns:
- if combined handler
-