Class HeaderAtnProvider.Builder
java.lang.Object
io.helidon.security.providers.header.HeaderAtnProvider.Builder
- All Implemented Interfaces:
Builder<HeaderAtnProvider.Builder,
,HeaderAtnProvider> Supplier<HeaderAtnProvider>
- Enclosing class:
- HeaderAtnProvider
public static final class HeaderAtnProvider.Builder
extends Object
implements Builder<HeaderAtnProvider.Builder,HeaderAtnProvider>
A fluent api Builder for
HeaderAtnProvider
.-
Method Summary
Modifier and TypeMethodDescriptionaddOutboundTarget
(OutboundTarget target) Configure outbound target for identity propagation.atnTokenHandler
(TokenHandler tokenHandler) Token handler to extract username from request.authenticate
(boolean authenticate) Whether to authenticate requests.build()
Build the instance from this builder.Load this builder from a configuration.optional
(boolean optional) Whether authentication is required.outboundTokenHandler
(TokenHandler tokenHandler) Token handler to create outbound headers to propagate identity.propagate
(boolean propagate) Whether to propagate identity.subjectType
(SubjectType subjectType) Principal type this provider extracts (and also propagates).
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<HeaderAtnProvider.Builder,
HeaderAtnProvider> - Returns:
- instance of the built type
-
config
Load this builder from a configuration.- Parameters:
config
- configuration to load from- Returns:
- updated builder instance
-
subjectType
Principal type this provider extracts (and also propagates).- Parameters:
subjectType
- type of principal- Returns:
- updated builder instance
-
propagate
Whether to propagate identity.- Parameters:
propagate
- whether to propagate identity (true) or not (false)- Returns:
- updated builder instance
-
authenticate
Whether to authenticate requests.- Parameters:
authenticate
- whether to authenticate (true) or not (false)- Returns:
- updated builder instance
-
atnTokenHandler
Token handler to extract username from request.- Parameters:
tokenHandler
- token handler instance- Returns:
- updated builder instance
-
outboundTokenHandler
Token handler to create outbound headers to propagate identity. If not defined,atnTokenHandler
will be used.- Parameters:
tokenHandler
- token handler instance- Returns:
- updated builder instance
-
optional
Whether authentication is required. By default, request will fail if the username cannot be extracted. If set to false, request will process and this provider will abstain.- Parameters:
optional
- whether authentication is optional (true) or required (false)- Returns:
- updated builder instance
-
addOutboundTarget
Configure outbound target for identity propagation.- Parameters:
target
- outbound target- Returns:
- updated builder instance
-