public interface ReadOnlyJWTClaimsSet
JWTClaimsSet.| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getAllClaims()
Gets all claims, both registered and custom, as a single map.
|
List<String> |
getAudience()
Gets the audience (
aud) clam. |
Boolean |
getBooleanClaim(String name)
Gets the specified claim (registered or custom) as
Boolean. |
Object |
getClaim(String name)
Gets the specified claim (registered or custom).
|
Object |
getCustomClaim(String name)
Gets a custom (non-registered) claim.
|
Map<String,Object> |
getCustomClaims()
Gets the custom (non-registered) claims.
|
Double |
getDoubleClaim(String name)
Gets the specified claim (registered or custom) as
Double. |
Date |
getExpirationTime()
Gets the expiration time (
exp) claim. |
Float |
getFloatClaim(String name)
Gets the specified claim (registered or custom) as
Float. |
Integer |
getIntegerClaim(String name)
Gets the specified claim (registered or custom) as
Integer. |
String |
getIssuer()
Gets the issuer (
iss) claim. |
Date |
getIssueTime()
Gets the issued-at (
iat) claim. |
String |
getJWTID()
Gets the JWT ID (
jti) claim. |
Long |
getLongClaim(String name)
Gets the specified claim (registered or custom) as
Long. |
Date |
getNotBeforeTime()
Gets the not-before (
nbf) claim. |
String |
getStringClaim(String name)
Gets the specified claim (registered or custom) as
String. |
String |
getSubject()
Gets the subject (
sub) claim. |
String |
getType()
Gets the type (
typ) claim. |
net.minidev.json.JSONObject |
toJSONObject()
Returns the JSON object representation of the claims set.
|
String getIssuer()
iss) claim.null if not specified.String getSubject()
sub) claim.null if not specified.List<String> getAudience()
aud) clam.null if not specified.Date getExpirationTime()
exp) claim.null if not specified.Date getNotBeforeTime()
nbf) claim.null if not specified.Date getIssueTime()
iat) claim.null if not specified.String getJWTID()
jti) claim.null if not specified.Object getCustomClaim(String name)
name - The name of the custom claim. Must not be null.null if not
specified.Map<String,Object> getCustomClaims()
Object getClaim(String name)
name - The name of the claim. Must not be null.null if not specified.String getStringClaim(String name) throws ParseException
String.name - The name of the claim. Must not be null.null if not specified.ParseException - If the claim value is not of the required
type.Boolean getBooleanClaim(String name) throws ParseException
Boolean.name - The name of the claim. Must not be null.null if not specified.ParseException - If the claim value is not of the required
type.Integer getIntegerClaim(String name) throws ParseException
Integer.name - The name of the claim. Must not be null.null if not specified.ParseException - If the claim value is not of the required
type.Long getLongClaim(String name) throws ParseException
Long.name - The name of the claim. Must not be null.null if not specified.ParseException - If the claim value is not of the required
type.Float getFloatClaim(String name) throws ParseException
Float.name - The name of the claim. Must not be null.null if not specified.ParseException - If the claim value is not of the required
type.Double getDoubleClaim(String name) throws ParseException
Double.name - The name of the claim. Must not be null.null if not specified.ParseException - If the claim value is not of the required
type.Map<String,Object> getAllClaims()
Note that the registered claims Expiration-Time (exp),
Not-Before-Time (nbf) and Issued-At (iat) will be
returned as java.util.Date instances.
net.minidev.json.JSONObject toJSONObject()
Copyright © 2014 Connect2id Ltd.. All Rights Reserved.