java.lang.Object
io.helidon.security.util.TokenHandler.Builder
- All Implemented Interfaces:
Builder<TokenHandler.Builder,
,TokenHandler> Supplier<TokenHandler>
- Enclosing class:
- TokenHandler
public static final class TokenHandler.Builder
extends Object
implements Builder<TokenHandler.Builder,TokenHandler>
Fluent API builder to create
TokenHandler
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a new instance from this builder.Update builder from config.tokenFormat
(String format) Token format for creating outbound tokens.tokenHeader
(String header) Set the name of header to look into to extract the token.tokenPattern
(Pattern pattern) Set the token pattern (Regular expression) to extract the token.tokenPrefix
(String prefix) Set the prefix of header value to extract the token.
-
Method Details
-
tokenHeader
Set the name of header to look into to extract the token.- Parameters:
header
- header name (such as Authorization), case insensitive- Returns:
- updated builder instance
-
tokenPrefix
Set the prefix of header value to extract the token.- Parameters:
prefix
- prefix of header value to strip from it, case insensitive- Returns:
- updated builder instance
-
tokenPattern
Set the token pattern (Regular expression) to extract the token.- Parameters:
pattern
- pattern to use to extract the token, first group will be used- Returns:
- updated builder instance
-
build
Build a new instance from this builder.- Specified by:
build
in interfaceBuilder<TokenHandler.Builder,
TokenHandler> - Returns:
- instance built based on this builder
-
config
Update builder from config.- Parameters:
config
- Configuration to update from- Returns:
- update builder instance
-
tokenFormat
Token format for creating outbound tokens.- Parameters:
format
- Format according toString.format(String, Object...)
, token will be a single string parameter- Returns:
- updated builder instance
-