Class HeaderAtnProvider.Builder
- java.lang.Object
-
- io.helidon.security.providers.header.HeaderAtnProvider.Builder
-
- All Implemented Interfaces:
Builder<HeaderAtnProvider>
,Supplier<HeaderAtnProvider>
- Enclosing class:
- HeaderAtnProvider
public static final class HeaderAtnProvider.Builder extends Object implements Builder<HeaderAtnProvider>
A fluent api Builder forHeaderAtnProvider
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeaderAtnProvider.Builder
atnTokenHandler(TokenHandler tokenHandler)
Token handler to extract username from request.HeaderAtnProvider.Builder
authenticate(boolean authenticate)
Whether to authenticate requests.HeaderAtnProvider
build()
Build the instance from this builder.HeaderAtnProvider.Builder
config(Config config)
Load this builder from a configuration.HeaderAtnProvider.Builder
optional(boolean optional)
Whether authentication is required.HeaderAtnProvider.Builder
outboundTokenHandler(TokenHandler tokenHandler)
Token handler to create outbound headers to propagate identity.HeaderAtnProvider.Builder
propagate(boolean propagate)
Whether to propagate identity.HeaderAtnProvider.Builder
subjectType(SubjectType subjectType)
Principal type this provider extracts (and also propagates).
-
-
-
Method Detail
-
build
public HeaderAtnProvider build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<HeaderAtnProvider>
- Returns:
- instance of the built type
-
config
public HeaderAtnProvider.Builder config(Config config)
Load this builder from a configuration.- Parameters:
config
- configuration to load from- Returns:
- updated builder instance
-
subjectType
public HeaderAtnProvider.Builder subjectType(SubjectType subjectType)
Principal type this provider extracts (and also propagates).- Parameters:
subjectType
- type of principal- Returns:
- updated builder instance
-
propagate
public HeaderAtnProvider.Builder propagate(boolean propagate)
Whether to propagate identity.- Parameters:
propagate
- whether to propagate identity (true) or not (false)- Returns:
- updated builder instance
-
authenticate
public HeaderAtnProvider.Builder authenticate(boolean authenticate)
Whether to authenticate requests.- Parameters:
authenticate
- whether to authenticate (true) or not (false)- Returns:
- updated builder instance
-
atnTokenHandler
public HeaderAtnProvider.Builder atnTokenHandler(TokenHandler tokenHandler)
Token handler to extract username from request.- Parameters:
tokenHandler
- token handler instance- Returns:
- updated builder instance
-
outboundTokenHandler
public HeaderAtnProvider.Builder outboundTokenHandler(TokenHandler tokenHandler)
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
public HeaderAtnProvider.Builder optional(boolean 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
-
-