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