- All Known Subinterfaces:
JwtClaims
,OpenIdClaims
public interface Claims
-
Method Summary
Modifier and TypeMethodDescriptiongetArrayStringClaim
(String name) Get String List claim of given namegetDoubleClaim
(String name) Get double claim of given namegetIntClaim
(String name) Get integer claim of given namegetLongClaim
(String name) Get long claim of given nameGet nested claims of given name.getNumericDateClaim
(String name) Get Numeric Date claim of given namegetStringClaim
(String name) Get String claim of given name
-
Method Details
-
getStringClaim
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
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
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
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
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
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
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
-