public static interface Claims.Builder
Modifier and Type | Method and Description |
---|---|
Claims.Builder |
audience(String audience,
String... moreAudiences)
Specifies a value for the claim.
|
Claims |
build()
Creates a
Claims instance using the configuration of this
builder. |
Claims.Builder |
expiresAt(Instant expiresAt)
Specifies a value for the claim.
|
Claims.Builder |
id(String id)
Specifies a value for the claim.
|
Claims.Builder |
issuedAt(Instant issuedAt)
Specifies a value for the claim.
|
Claims.Builder |
issuer(String issuer)
Specifies a value for the claim.
|
Claims.Builder |
set(String name,
Boolean value)
Specifies a value for an arbitrary claim.
|
Claims.Builder |
set(String name,
Collection<?> values)
Specifies a value for an arbitrary claim.
|
Claims.Builder |
set(String name,
Number value)
Specifies a value for an arbitrary claim.
|
Claims.Builder |
set(String name,
Object[] values)
Specifies a value for an arbitrary claim.
|
Claims.Builder |
set(String name,
Object value,
Object... moreValues)
Specifies a value for an arbitrary claim.
|
Claims.Builder |
set(String name,
String value)
Specifies a value for an arbitrary claim.
|
Claims.Builder |
subject(String subject)
Specifies a value for the claim.
|
Claims.Builder id(String id)
id
- id valueClaims.Builder issuer(String issuer)
issuer
- issuer valueClaims.Builder audience(String audience, String... moreAudiences)
audience
- audience valuemoreAudiences
- additional audience valuesClaims.Builder subject(String subject)
subject
- subject valueClaims.Builder issuedAt(Instant issuedAt)
issuedAt
- instant that represents the issued-at timeClaims.Builder expiresAt(Instant expiresAt)
expiresAt
- instant that represents the expires-at timeClaims.Builder set(String name, String value)
name
- name of the claimvalue
- string valueClaims.Builder set(String name, Number value)
name
- name of the claimvalue
- number valueClaims.Builder set(String name, Boolean value)
name
- name of the claimvalue
- boolean valueClaims.Builder set(String name, Object value, Object... moreValues)
name
- name of the claimvalue
- first value for the claimmoreValues
- more values for the claimIllegalArgumentException
- if the provider does not support
any one of the data types composed in the arrayClaims.Builder set(String name, Object[] values)
name
- name of the claimvalues
- value(s) for the claim; if empty array, any existing
value for the claim will be removed and the claim will not be included
in the resulting representationIllegalArgumentException
- if the provider does not support the
given collection type or any one of the types of values composed in
the collectionClaims.Builder set(String name, Collection<?> values)
name
- name of the claimvalues
- value(s) for the claim; if empty collection, any existing
value for the claim will be removed and the claim will not be included
in the resulting representationIllegalArgumentException
- if the provider does not support the
given collection type or any one of the types of values composed in
the collectionCopyright © 2019. All rights reserved.