public static class TokenHandler.Builder extends java.lang.Object implements Builder<TokenHandler>
TokenHandler.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
TokenHandler |
build()
Build a new instance from this builder.
|
TokenHandler.Builder |
fromConfig(Config config)
Update builder from config.
|
TokenHandler.Builder |
tokenFormat(java.lang.String format)
Token format for creating outbound tokens.
|
TokenHandler.Builder |
tokenHeader(java.lang.String header)
Set the name of header to look into to extract the token.
|
TokenHandler.Builder |
tokenPattern(java.util.regex.Pattern pattern)
Set the token pattern (Regular expression) to extract the token.
|
TokenHandler.Builder |
tokenPrefix(java.lang.String prefix)
Set the prefix of header value to extract the token.
|
public TokenHandler.Builder tokenHeader(java.lang.String header)
header - header name (such as Authorization), case insensitivepublic TokenHandler.Builder tokenPrefix(java.lang.String prefix)
prefix - prefix of header value to strip from it, case insensitivepublic TokenHandler.Builder tokenPattern(java.util.regex.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 fromConfig(Config config)
config - Configuration to update frompublic TokenHandler.Builder tokenFormat(java.lang.String format)
format - Format according to String.format(String, Object...), token will be a single string parameterCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.