Class SecurityHandlerConfig.Builder
java.lang.Object
io.helidon.webserver.security.SecurityHandlerConfig.BuilderBase<SecurityHandlerConfig.Builder, SecurityHandlerConfig>
io.helidon.webserver.security.SecurityHandlerConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<SecurityHandlerConfig.Builder, SecurityHandlerConfig>, Builder<SecurityHandlerConfig.Builder, SecurityHandler>, ConfigBuilderSupport.ConfiguredBuilder<SecurityHandlerConfig.Builder, SecurityHandlerConfig>, Supplier<SecurityHandler>
- Enclosing interface:
SecurityHandlerConfig
public static class SecurityHandlerConfig.Builder
extends SecurityHandlerConfig.BuilderBase<SecurityHandlerConfig.Builder, SecurityHandlerConfig>
implements Builder<SecurityHandlerConfig.Builder, SecurityHandler>
Fluent API builder for
SecurityHandler.-
Nested Class Summary
Nested classes/interfaces inherited from class SecurityHandlerConfig.BuilderBase
SecurityHandlerConfig.BuilderBase.SecurityHandlerConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class SecurityHandlerConfig.BuilderBase
addObject, addObject, addQueryParam, addQueryParams, addRoleAllowed, addRolesAllowed, addSockets, audit, audit, auditEventType, auditEventType, auditMessageFormat, auditMessageFormat, authenticate, authenticate, authenticationOptional, authenticationOptional, authenticator, authenticator, authorize, authorize, authorizer, authorizer, clearAudit, clearAuditEventType, clearAuditMessageFormat, clearAuthenticate, clearAuthenticationOptional, clearAuthenticator, clearAuthorize, clearAuthorizer, clearCustomObjects, clearQueryParams, clearRolesAllowed, clearSockets, combined, combined, config, config, customObjects, customObjects, from, from, preBuildPrototype, queryParams, queryParams, rolesAllowed, rolesAllowed, sockets, sockets, toString, validatePrototypeModifier and TypeMethodDescriptionRegister a custom object for security request(s).Register a custom object for security request(s).addQueryParam(SecurityHandler.QueryParamHandler queryParam) Query parameter handler(s).addQueryParams(List<? extends SecurityHandler.QueryParamHandler> queryParams) Query parameter handler(s).addRoleAllowed(String roleAllowed) An array of allowed roles for this path - must have a security provider supporting roles (either authentication or authorization provider).addRolesAllowed(Set<String> rolesAllowed) An array of allowed roles for this path - must have a security provider supporting roles (either authentication or authorization provider).addSockets(List<String> sockets) List of sockets this configuration should be applied to.audit()Whether to audit this request - defaults to false, if enabled, request is audited with event type "request".audit(boolean audit) Whether to audit this request - defaults to false, if enabled, request is audited with event type "request".Override for event-type, defaults to "request".auditEventType(String auditEventType) 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".auditMessageFormat(String auditMessageFormat) 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).authenticate(boolean authenticate) 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).authenticationOptional(boolean authenticationOptional) 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).authenticator(String authenticator) Use a named authenticator (as supported by security - if not defined, default authenticator is used).Enable authorization for this route.authorize(boolean authorize) 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).authorizer(String authorizer) Use a named authorizer (as supported by security - if not defined, default authorizer is used, if none defined, all is permitted).Clear existing value of audit.Clear existing value of auditEventType.Clear existing value of auditMessageFormat.Clear existing value of authenticate.Clear existing value of authenticationOptional.Clear existing value of authenticator.Clear existing value of authorize.Clear existing value of authorizer.Clear existing value of customObjects.Clear all queryParams.Clear all rolesAllowed.Clear all sockets.booleancombined()Whether this is a combined handler.combined(boolean combined) Whether this is a combined handler.config()Configuration associated with this security handler.Update builder from configuration (node of this type).A store of custom objects, that can be used to customize specific security providers.customObjects(ClassToInstanceStore<Object> customObjects) A store of custom objects, that can be used to customize specific security providers.from(SecurityHandlerConfig prototype) Update this builder from an existing prototype instance.from(SecurityHandlerConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.protected voidHandles providers and decorators.Query parameter handler(s).queryParams(List<? extends SecurityHandler.QueryParamHandler> queryParams) Query parameter handler(s).An array of allowed roles for this path - must have a security provider supporting roles (either authentication or authorization provider).rolesAllowed(Set<String> rolesAllowed) 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.List of sockets this configuration should be applied to.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault SecurityHandlerget()default SecurityHandlerConfig.Builderidentity()Instance of this builder as the correct type.default SecurityHandlerConfig.Builderupdate(Consumer<SecurityHandlerConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault SecurityHandlerConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<SecurityHandlerConfig.Builder, SecurityHandlerConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<SecurityHandlerConfig.Builder, SecurityHandler>- Returns:
- instance of the built type
-