Interface Claims
-
- All Known Subinterfaces:
JwtClaims
,OpenIdClaims
public interface Claims
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>
getArrayStringClaim(String name)
Get String List claim of given nameOptionalDouble
getDoubleClaim(String name)
Get double claim of given nameOptionalInt
getIntClaim(String name)
Get integer claim of given nameOptionalLong
getLongClaim(String name)
Get long claim of given nameOptional<Claims>
getNested(String name)
Get nested claims of given name.Optional<Instant>
getNumericDateClaim(String name)
Get Numeric Date claim of given nameOptional<String>
getStringClaim(String name)
Get String claim of given name
-
-
-
Method Detail
-
getStringClaim
Optional<String> getStringClaim(String name)
Get String claim of given name- Parameters:
name
-- Returns:
- value, or empty optional if not present
- Throws:
IllegalArgumentException
- when value of claim is not a string
-
getNumericDateClaim
Optional<Instant> getNumericDateClaim(String name)
Get Numeric Date claim of given name- Parameters:
name
-- Returns:
- value, or empty optional if not present
- Throws:
IllegalArgumentException
- when value of claim is not a number that represents an epoch seconds
-
getArrayStringClaim
List<String> getArrayStringClaim(String name)
Get String List claim of given name- Parameters:
name
-- Returns:
- a list with values of the claim, or empty list if value is not present.
- Throws:
IllegalArgumentException
- when value of claim is neither string or array of strings
-
getIntClaim
OptionalInt getIntClaim(String name)
Get integer claim of given name- Parameters:
name
-- Returns:
- value, or empty optional if not present
- Throws:
IllegalArgumentException
- when value of claim is not a number
-
getLongClaim
OptionalLong getLongClaim(String name)
Get long claim of given name- Parameters:
name
-- Returns:
- value, or empty optional if not present
- Throws:
IllegalArgumentException
- when value of claim is not a number
-
getDoubleClaim
OptionalDouble getDoubleClaim(String name)
Get double claim of given name- Parameters:
name
-- Returns:
- value, or empty optional if not present
- Throws:
IllegalArgumentException
- when value of claim is not a number
-
getNested
Optional<Claims> getNested(String name)
Get nested claims of given name.- Parameters:
name
-- Returns:
- Claims instance represented nested values within that claim, or empty optional if not present
- Throws:
IllegalArgumentException
- when value is not a nested object
-
-