public interface ClaimAccessor
| Modifier and Type | Method and Description |
|---|---|
default java.lang.Boolean |
containsClaim(java.lang.String claim)
|
default <T> T |
getClaim(java.lang.String claim)
Returns the claim value as a
T type. |
default java.lang.Boolean |
getClaimAsBoolean(java.lang.String claim)
Returns the claim value as a
Boolean or null if it does not exist. |
default java.time.Instant |
getClaimAsInstant(java.lang.String claim)
Returns the claim value as an
Instant or null if it does not exist. |
default java.util.Map<java.lang.String,java.lang.Object> |
getClaimAsMap(java.lang.String claim)
Returns the claim value as a
Map<String, Object>
or null if it does not exist or cannot be assigned to a Map. |
default java.lang.String |
getClaimAsString(java.lang.String claim)
Returns the claim value as a
String or null if it does not exist or is equal to null. |
default java.util.List<java.lang.String> |
getClaimAsStringList(java.lang.String claim)
Returns the claim value as a
List<String>
or null if it does not exist or cannot be assigned to a List. |
default java.net.URL |
getClaimAsURL(java.lang.String claim)
Returns the claim value as an
URL or null if it does not exist. |
java.util.Map<java.lang.String,java.lang.Object> |
getClaims()
Returns a set of claims that may be used for assertions.
|
java.util.Map<java.lang.String,java.lang.Object> getClaims()
Map of claimsdefault <T> T getClaim(java.lang.String claim)
T type.
The claim value is expected to be of type T.T - the type of the claim valueclaim - the name of the claimdefault java.lang.Boolean containsClaim(java.lang.String claim)
claim - the name of the claimtrue if the claim exists, otherwise falsedefault java.lang.String getClaimAsString(java.lang.String claim)
String or null if it does not exist or is equal to null.claim - the name of the claimnull if it does not exist or is equal to nulldefault java.lang.Boolean getClaimAsBoolean(java.lang.String claim)
Boolean or null if it does not exist.claim - the name of the claimnull if it does not existdefault java.time.Instant getClaimAsInstant(java.lang.String claim)
Instant or null if it does not exist.claim - the name of the claimnull if it does not existdefault java.net.URL getClaimAsURL(java.lang.String claim)
URL or null if it does not exist.claim - the name of the claimnull if it does not existdefault java.util.Map<java.lang.String,java.lang.Object> getClaimAsMap(java.lang.String claim)
Map<String, Object>
or null if it does not exist or cannot be assigned to a Map.claim - the name of the claimnull if it does not exist or cannot be assigned to a Mapdefault java.util.List<java.lang.String> getClaimAsStringList(java.lang.String claim)
List<String>
or null if it does not exist or cannot be assigned to a List.claim - the name of the claimnull if it does not exist or cannot be assigned to a List