Package com.ibm.websphere.security.jwt
Interface Claims
The
Claims
interface represents JSON Web Token (JWT) payload claims and offers convenient get methods for some of the
well known JWT claims such as "iss", "exp", and "iat".- Since:
- 1.0
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The AUDIENCE is used to represent the "aud" claimstatic final String
The AZP is used to represent the "azp" claimstatic final String
The EXPIRATION is used to represent the "exp" claimstatic final String
The ID is used to represent the "jti" claimstatic final String
The ISSUED_AT is used to represent the "iat" claimstatic final String
The ISSUER is used to represent the "iss" claimstatic final String
The NOT_BEFORE is used to represent the "nbf" claimstatic final String
The SUBJECT is used to represent the "sub" claimstatic final String
The TOKEN_TYPE is used to represent the "token_type" claim -
Method Summary
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
ISSUER
The ISSUER is used to represent the "iss" claim- See Also:
-
SUBJECT
The SUBJECT is used to represent the "sub" claim- See Also:
-
AUDIENCE
The AUDIENCE is used to represent the "aud" claim- See Also:
-
EXPIRATION
The EXPIRATION is used to represent the "exp" claim- See Also:
-
NOT_BEFORE
The NOT_BEFORE is used to represent the "nbf" claim- See Also:
-
ISSUED_AT
The ISSUED_AT is used to represent the "iat" claim- See Also:
-
ID
The ID is used to represent the "jti" claim- See Also:
-
AZP
The AZP is used to represent the "azp" claim- See Also:
-
TOKEN_TYPE
The TOKEN_TYPE is used to represent the "token_type" claim- See Also:
-
-
Method Details
-
getIssuer
String getIssuer()- Returns:
- The "iss" claim
-
getSubject
String getSubject()- Returns:
- The "sub" claim
-
getAudience
- Returns:
- The "aud" claim
-
getExpiration
long getExpiration()- Returns:
- The "exp" claim
-
getNotBefore
long getNotBefore()- Returns:
- The "nbf" claim
-
getIssuedAt
long getIssuedAt()- Returns:
- The "iat" claim
-
getJwtId
String getJwtId()- Returns:
- The "jti" claim
-
getAuthorizedParty
String getAuthorizedParty()- Returns:
- The "azp" claim
-
getClaim
- Parameters:
claimName
- claim namerequiredType
- This is the required type of the claim value- Returns:
- The claim value that matches the requiredType
-
getAllClaims
- Returns:
- All the claims
-
toJsonString
String toJsonString()- Returns:
- All the claims in JSON string format
-