public static final class TokenPolicy.Builder extends Object
TokenPolicy.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
TokenPolicy.Builder |
accessTokenValidity(Integer accessTokenValidity)
Initializes the value for the
accessTokenValidity attribute. |
TokenPolicy.Builder |
activeKeyId(String activeKeyId)
Initializes the value for the
activeKeyId attribute. |
TokenPolicy |
build()
Builds a new
TokenPolicy. |
TokenPolicy.Builder |
from(TokenPolicy instance)
Fill a builder with attribute values from the provided
TokenPolicy instance. |
TokenPolicy.Builder |
jwtRevocable(Boolean jwtRevocable)
Initializes the value for the
jwtRevocable attribute. |
TokenPolicy.Builder |
key(Map.Entry<String,? extends Object> entry)
Put one entry to the
keys map. |
TokenPolicy.Builder |
key(String key,
Object value)
Put one entry to the
keys map. |
TokenPolicy.Builder |
keys(Map<String,? extends Object> entries)
Sets or replaces all mappings from the specified map as entries for the
keys map. |
TokenPolicy.Builder |
putAllKeys(Map<String,? extends Object> entries)
Put all mappings from the specified map as entries to
keys map. |
TokenPolicy.Builder |
refreshTokenFormat(RefreshTokenFormat refreshTokenFormat)
Initializes the value for the
refreshTokenFormat attribute. |
TokenPolicy.Builder |
refreshTokenUnique(Boolean refreshTokenUnique)
Initializes the value for the
refreshTokenUnique attribute. |
TokenPolicy.Builder |
refreshTokenValidity(Integer refreshTokenValidity)
Initializes the value for the
refreshTokenValidity attribute. |
public final TokenPolicy.Builder from(TokenPolicy instance)
TokenPolicy instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final TokenPolicy.Builder accessTokenValidity(Integer accessTokenValidity)
accessTokenValidity attribute.accessTokenValidity - The value for accessTokenValidity (can be null)this builder for use in a chained invocationpublic final TokenPolicy.Builder activeKeyId(String activeKeyId)
activeKeyId attribute.activeKeyId - The value for activeKeyId (can be null)this builder for use in a chained invocationpublic final TokenPolicy.Builder jwtRevocable(Boolean jwtRevocable)
jwtRevocable attribute.jwtRevocable - The value for jwtRevocable (can be null)this builder for use in a chained invocationpublic final TokenPolicy.Builder key(String key, Object value)
keys map.key - The key in the keys mapvalue - The associated value in the keys mapthis builder for use in a chained invocationpublic final TokenPolicy.Builder key(Map.Entry<String,? extends Object> entry)
keys map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final TokenPolicy.Builder keys(Map<String,? extends Object> entries)
keys map. Nulls are not permitted as keys or values, but parameter itself can be nullentries - The entries that will be added to the keys mapthis builder for use in a chained invocationpublic final TokenPolicy.Builder putAllKeys(Map<String,? extends Object> entries)
keys map. Nulls are not permittedentries - The entries that will be added to the keys mapthis builder for use in a chained invocationpublic final TokenPolicy.Builder refreshTokenFormat(RefreshTokenFormat refreshTokenFormat)
refreshTokenFormat attribute.refreshTokenFormat - The value for refreshTokenFormat (can be null)this builder for use in a chained invocationpublic final TokenPolicy.Builder refreshTokenUnique(Boolean refreshTokenUnique)
refreshTokenUnique attribute.refreshTokenUnique - The value for refreshTokenUnique (can be null)this builder for use in a chained invocationpublic final TokenPolicy.Builder refreshTokenValidity(Integer refreshTokenValidity)
refreshTokenValidity attribute.refreshTokenValidity - The value for refreshTokenValidity (can be null)this builder for use in a chained invocationpublic TokenPolicy build()
TokenPolicy.IllegalStateException - if any required attributes are missingCopyright © 2020. All rights reserved.