Package io.helidon.webserver.security
Class SecurityHandlerConfig.BuilderBase.SecurityHandlerConfigImpl
java.lang.Object
io.helidon.webserver.security.SecurityHandlerConfig.BuilderBase.SecurityHandlerConfigImpl
- All Implemented Interfaces:
Prototype.Api
,Prototype.Factory<SecurityHandler>
,SecurityHandlerConfig
,Supplier<SecurityHandler>
- Enclosing class:
SecurityHandlerConfig.BuilderBase<BUILDER extends SecurityHandlerConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SecurityHandlerConfig>
protected static class SecurityHandlerConfig.BuilderBase.SecurityHandlerConfigImpl
extends Object
implements SecurityHandlerConfig, Supplier<SecurityHandler>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.security.SecurityHandlerConfig
SecurityHandlerConfig.Builder, SecurityHandlerConfig.BuilderBase<BUILDER extends SecurityHandlerConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SecurityHandlerConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SecurityHandlerConfigImpl
(SecurityHandlerConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
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).build()
Create a new instance of the runtime type from this config object.boolean
combined()
Whether this is a combined handler.config()
Configuration associated with this security handler.A store of custom objects, that can be used to customize specific security providers.boolean
get()
int
hashCode()
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.toString()
-
Constructor Details
-
SecurityHandlerConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<SecurityHandler>
- Returns:
- new configured runtime instance
-
get
- Specified by:
get
in interfaceSupplier<SecurityHandler>
-
rolesAllowed
Description copied from interface:SecurityHandlerConfig
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()
andSecurityHandlerConfig.authenticationOptional()
if needed).- Specified by:
rolesAllowed
in interfaceSecurityHandlerConfig
- Returns:
- if subject is any of these roles, allow access
-
authenticator
Description copied from interface:SecurityHandlerConfig
Use a named authenticator (as supported by security - if not defined, default authenticator is used). Will enable authentication.- Specified by:
authenticator
in interfaceSecurityHandlerConfig
- Returns:
- name of authenticator as configured in
Security
-
authorizer
Description copied from interface:SecurityHandlerConfig
Use a named authorizer (as supported by security - if not defined, default authorizer is used, if none defined, all is permitted). Will enable authorization.- Specified by:
authorizer
in interfaceSecurityHandlerConfig
- Returns:
- name of authorizer as configured in
Security
-
authenticate
Description copied from interface:SecurityHandlerConfig
If called, request will go through authentication process - defaults to false (even if authorize is true).- Specified by:
authenticate
in interfaceSecurityHandlerConfig
- Returns:
- whether to authenticate or not
-
authenticationOptional
Description copied from interface:SecurityHandlerConfig
If called, authentication failure will not abort request and will continue as anonymous (defaults to false).- Specified by:
authenticationOptional
in interfaceSecurityHandlerConfig
- Returns:
- whether authn is optional
-
audit
Description copied from interface:SecurityHandlerConfig
Whether to audit this request - defaults to false, if enabled, request is audited with event type "request".- Specified by:
audit
in interfaceSecurityHandlerConfig
- Returns:
- whether to audit
-
authorize
Description copied from interface:SecurityHandlerConfig
Enable authorization for this route.- Specified by:
authorize
in interfaceSecurityHandlerConfig
- Returns:
- whether to authorize
-
auditEventType
Description copied from interface:SecurityHandlerConfig
Override for event-type, defaults to "request".- Specified by:
auditEventType
in interfaceSecurityHandlerConfig
- Returns:
- audit event type to use
-
auditMessageFormat
Description copied from interface:SecurityHandlerConfig
Override for audit message format, defaults to "%3$s %1$s \"%2$s\" %5$s %6$s requested by %4$s".- Specified by:
auditMessageFormat
in interfaceSecurityHandlerConfig
- Returns:
- audit message format to use
-
queryParams
Description copied from interface:SecurityHandlerConfig
Query parameter handler(s).- Specified by:
queryParams
in interfaceSecurityHandlerConfig
- Returns:
- query parameters
-
customObjects
Description copied from interface:SecurityHandlerConfig
A store of custom objects, that can be used to customize specific security providers.- Specified by:
customObjects
in interfaceSecurityHandlerConfig
- Returns:
- custom objects
-
sockets
Description copied from interface:SecurityHandlerConfig
List of sockets this configuration should be applied to. If empty, the configuration is applied to all configured sockets.- Specified by:
sockets
in interfaceSecurityHandlerConfig
- Returns:
- list of sockets
-
config
Description copied from interface:SecurityHandlerConfig
Configuration associated with this security handler.- Specified by:
config
in interfaceSecurityHandlerConfig
- Returns:
- the configuration (if provided)
-
combined
public boolean combined()Description copied from interface:SecurityHandlerConfig
Whether this is a combined handler. Internal use.- Specified by:
combined
in interfaceSecurityHandlerConfig
- Returns:
- if combined handler
-
toString
-
equals
-
hashCode
public int hashCode()
-