|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.oauth2.sdk.auth.JWTAuthenticationClaimsSet
public class JWTAuthenticationClaimsSet
JWT client authentication claims set, serialisable to a JSON object and JWT claims set. This class is immutable.
Used for client secret JWT
and
private key JWT
authentication at the Token endpoint.
Example client authentication claims set:
{ "iss" : "http://client.example.com", "sub" : "http://client.example.com", "aud" : [ "http://idp.example.com/token" ], "jti" : "d396036d-c4d9-40d8-8e98-f7e8327002d9", "exp" : 1311281970, "iat" : 1311280970 }
Related specifications:
Constructor Summary | |
---|---|
JWTAuthenticationClaimsSet(ClientID clientID,
Audience aud,
Date exp,
Date nbf,
Date iat,
JWTID jti)
Creates a new JWT client authentication claims set. |
Method Summary | |
---|---|
Audience |
getAudience()
Gets the audience. |
ClientID |
getClientID()
Gets the client identifier. |
Date |
getExpirationTime()
Gets the expiration time. |
Issuer |
getIssuer()
Gets the issuer. |
Date |
getIssueTime()
Gets the optional issue time. |
JWTID |
getJWTID()
Gets the identifier for the JWT. |
Date |
getNotBeforeTime()
Gets the not-before time. |
static Set<String> |
getReservedClaimNames()
Gets the names of the reserved client authentication claims. |
Subject |
getSubject()
Gets the subject. |
static JWTAuthenticationClaimsSet |
parse(net.minidev.json.JSONObject jsonObject)
Parses a JWT client authentication claims set from the specified JSON object. |
static JWTAuthenticationClaimsSet |
parse(com.nimbusds.jwt.ReadOnlyJWTClaimsSet jwtClaimsSet)
Parses a JWT client authentication claims set from the specified JWT claims set. |
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this JWT client authentication claims set. |
com.nimbusds.jwt.JWTClaimsSet |
toJWTClaimsSet()
Returns a JSON Web Token (JWT) claims set representation of this client authentication claims set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JWTAuthenticationClaimsSet(ClientID clientID, Audience aud, Date exp, Date nbf, Date iat, JWTID jti)
clientID
- The client identifier. Used to specify the issuer
and the subject. Must not be null
.aud
- The audience identifier, typically the URL of the
authorisation server's Token endpoint. Must not be
null
.exp
- The expiration time. Must not be null
.nbf
- The time before which the token must not be
accepted for processing, null
if not
specified.iat
- The time at which the token was issued,
null
if not specified.jti
- Unique identifier for the JWT, null
if
not specified.Method Detail |
---|
public static Set<String> getReservedClaimNames()
public ClientID getClientID()
iss
and
sub
claims.
public Issuer getIssuer()
iss
claim.
public Subject getSubject()
sub
claim.
public Audience getAudience()
aud
claim
(single-valued).
public Date getExpirationTime()
exp
claim.
public Date getNotBeforeTime()
nbf
claim.
null
if not specified.public Date getIssueTime()
iat
claim.
null
if not specified.public JWTID getJWTID()
jti
claim.
null
if not specified.public net.minidev.json.JSONObject toJSONObject()
public com.nimbusds.jwt.JWTClaimsSet toJWTClaimsSet()
public static JWTAuthenticationClaimsSet parse(net.minidev.json.JSONObject jsonObject) throws ParseException
jsonObject
- The JSON object. Must not be null
.
ParseException
- If the JSON object couldn't be parsed to a
client authentication claims set.public static JWTAuthenticationClaimsSet parse(com.nimbusds.jwt.ReadOnlyJWTClaimsSet jwtClaimsSet) throws ParseException
jwtClaimsSet
- The JWT claims set. Must not be null
.
ParseException
- If the JWT claims set couldn't be parsed to a
client authentication claims set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |