public static final class TokenHandler.Builder extends Object implements Builder<TokenHandler>
TokenHandler.| Modifier and Type | Method and Description |
|---|---|
TokenHandler |
build()
Build a new instance from this builder.
|
TokenHandler.Builder |
config(Config config)
Update builder from config.
|
TokenHandler.Builder |
tokenFormat(String format)
Token format for creating outbound tokens.
|
TokenHandler.Builder |
tokenHeader(String header)
Set the name of header to look into to extract the token.
|
TokenHandler.Builder |
tokenPattern(Pattern pattern)
Set the token pattern (Regular expression) to extract the token.
|
TokenHandler.Builder |
tokenPrefix(String prefix)
Set the prefix of header value to extract the token.
|
public TokenHandler.Builder tokenHeader(String header)
header - header name (such as Authorization), case insensitivepublic TokenHandler.Builder tokenPrefix(String prefix)
prefix - prefix of header value to strip from it, case insensitivepublic TokenHandler.Builder tokenPattern(Pattern pattern)
pattern - pattern to use to extract the token, first group will be usedpublic TokenHandler build()
build in interface Builder<TokenHandler>public TokenHandler.Builder config(Config config)
config - Configuration to update frompublic TokenHandler.Builder tokenFormat(String format)
format - Format according to String.format(String, Object...), token will be a single string parameterCopyright © 2018–2019 Oracle Corporation. All rights reserved.