com.nimbusds.jwt
Interface ReadOnlyJWTClaimsSet

All Known Implementing Classes:
JWTClaimsSet

public interface ReadOnlyJWTClaimsSet

Read-only view of a JWTClaimsSet.

Version:
$version$ (2013-02-21)
Author:
Vladimir Dzhuvinov, Justin Richer

Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getAllClaims()
          Gets all claims, both reserved and custom, as a single map.
 java.util.List<java.lang.String> getAudience()
          Gets the audience (aud) clam.
 java.lang.Object getClaim(java.lang.String name)
          Gets a single claim by name, whether reserved or custom.
 java.lang.Object getCustomClaim(java.lang.String name)
          Gets a custom (non-reserved) claim.
 java.util.Map<java.lang.String,java.lang.Object> getCustomClaims()
          Gets the custom (non-reserved) claims.
 java.util.Date getExpirationTime()
          Gets the expiration time (exp) claim.
 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.util.Date getNotBeforeTime()
          Gets the not-before (nbf) claim.
 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.
 

Method Detail

getIssuer

java.lang.String getIssuer()
Gets the issuer (iss) claim.

Returns:
The issuer claim, null if not specified.

getSubject

java.lang.String getSubject()
Gets the subject (sub) claim.

Returns:
The subject claim, null if not specified.

getAudience

java.util.List<java.lang.String> getAudience()
Gets the audience (aud) clam.

Returns:
The audience claim, null if not specified.

getExpirationTime

java.util.Date getExpirationTime()
Gets the expiration time (exp) claim.

Returns:
The expiration time, null if not specified.

getNotBeforeTime

java.util.Date getNotBeforeTime()
Gets the not-before (nbf) claim.

Returns:
The not-before claim, null if not specified.

getIssueTime

java.util.Date getIssueTime()
Gets the issued-at (iat) claim.

Returns:
The issued-at claim, null if not specified.

getJWTID

java.lang.String getJWTID()
Gets the JWT ID (jti) claim.

Returns:
The JWT ID claim, null if not specified.

getType

java.lang.String getType()
Gets the type (typ) claim.

Returns:
The type claim, null if not specified.

getCustomClaim

java.lang.Object getCustomClaim(java.lang.String name)
Gets a custom (non-reserved) claim.

Parameters:
name - The name of the custom claim. Must not be null.
Returns:
The value of the custom claim, null if not specified.

getCustomClaims

java.util.Map<java.lang.String,java.lang.Object> getCustomClaims()
Gets the custom (non-reserved) claims.

Returns:
The custom claims, as a unmodifiable map, empty map if none.

getClaim

java.lang.Object getClaim(java.lang.String name)
Gets a single claim by name, whether reserved or custom.

Parameters:
name - The name of the claim to get. Must not be null.
Returns:
The value of the claim, null if not specified.

getAllClaims

java.util.Map<java.lang.String,java.lang.Object> getAllClaims()
Gets all claims, both reserved and custom, as a single map.

Note that the reserved claims Expiration-Time (exp), Not-Before-Time (nbf) and Issued-At (iat) will be returned as java.util.Date instances.

Returns:
All claims, as an unmodifiable map, empty map if none.

toJSONObject

net.minidev.json.JSONObject toJSONObject()
Returns the JSON object representation of the claims set.

Returns:
The JSON object representation.


Copyright © 2013 NimbusDS. All Rights Reserved.