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
ConstructorsModifierConstructorDescriptionprotectedSecurityHandlerConfigImpl(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.booleancombined()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.booleanget()inthashCode()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.FactoryCreate a new instance of the runtime type from this config object.- Specified by:
buildin interfacePrototype.Factory<SecurityHandler>- Returns:
- new configured runtime instance
-
get
- Specified by:
getin interfaceSupplier<SecurityHandler>
-
rolesAllowed
Description copied from interface:SecurityHandlerConfigAn 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:
rolesAllowedin interfaceSecurityHandlerConfig- Returns:
- if subject is any of these roles, allow access
-
authenticator
Description copied from interface:SecurityHandlerConfigUse a named authenticator (as supported by security - if not defined, default authenticator is used). Will enable authentication.- Specified by:
authenticatorin interfaceSecurityHandlerConfig- Returns:
- name of authenticator as configured in
Security
-
authorizer
Description copied from interface:SecurityHandlerConfigUse 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:
authorizerin interfaceSecurityHandlerConfig- Returns:
- name of authorizer as configured in
Security
-
authenticate
Description copied from interface:SecurityHandlerConfigIf called, request will go through authentication process - defaults to false (even if authorize is true).- Specified by:
authenticatein interfaceSecurityHandlerConfig- Returns:
- whether to authenticate or not
-
authenticationOptional
Description copied from interface:SecurityHandlerConfigIf called, authentication failure will not abort request and will continue as anonymous (defaults to false).- Specified by:
authenticationOptionalin interfaceSecurityHandlerConfig- Returns:
- whether authn is optional
-
audit
Description copied from interface:SecurityHandlerConfigWhether to audit this request - defaults to false, if enabled, request is audited with event type "request".- Specified by:
auditin interfaceSecurityHandlerConfig- Returns:
- whether to audit
-
authorize
Description copied from interface:SecurityHandlerConfigEnable authorization for this route.- Specified by:
authorizein interfaceSecurityHandlerConfig- Returns:
- whether to authorize
-
auditEventType
Description copied from interface:SecurityHandlerConfigOverride for event-type, defaults to "request".- Specified by:
auditEventTypein interfaceSecurityHandlerConfig- Returns:
- audit event type to use
-
auditMessageFormat
Description copied from interface:SecurityHandlerConfigOverride for audit message format, defaults to "%3$s %1$s \"%2$s\" %5$s %6$s requested by %4$s".- Specified by:
auditMessageFormatin interfaceSecurityHandlerConfig- Returns:
- audit message format to use
-
queryParams
Description copied from interface:SecurityHandlerConfigQuery parameter handler(s).- Specified by:
queryParamsin interfaceSecurityHandlerConfig- Returns:
- query parameters
-
customObjects
Description copied from interface:SecurityHandlerConfigA store of custom objects, that can be used to customize specific security providers.- Specified by:
customObjectsin interfaceSecurityHandlerConfig- Returns:
- custom objects
-
sockets
Description copied from interface:SecurityHandlerConfigList of sockets this configuration should be applied to. If empty, the configuration is applied to all configured sockets.- Specified by:
socketsin interfaceSecurityHandlerConfig- Returns:
- list of sockets
-
config
Description copied from interface:SecurityHandlerConfigConfiguration associated with this security handler.- Specified by:
configin interfaceSecurityHandlerConfig- Returns:
- the configuration (if provided)
-
combined
public boolean combined()Description copied from interface:SecurityHandlerConfigWhether this is a combined handler. Internal use.- Specified by:
combinedin interfaceSecurityHandlerConfig- Returns:
- if combined handler
-
toString
-
equals
-
hashCode
public int hashCode()
-