public class JWTAssertionClaimsSet extends Object
Used for client secret JWT
and
private key JWT
authentication at the Token endpoint.
Example JWT bearer assertion claims set for client authentication:
{ "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 and Description |
---|
JWTAssertionClaimsSet(Issuer iss,
Subject sub,
Audience aud)
Creates a new JWT JWT bearer assertion claims set.
|
JWTAssertionClaimsSet(Issuer iss,
Subject sub,
List<Audience> aud,
Date exp,
Date nbf,
Date iat,
JWTID jti,
Map<String,Object> other)
Creates a new JWT JWT bearer assertion claims set.
|
Modifier and Type | Method and Description |
---|---|
List<Audience> |
getAudience()
Gets the audience.
|
Map<String,Object> |
getCustomClaims()
Gets the custom claims.
|
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> |
getReservedClaimsNames()
Gets the names of the reserved JWT bearer assertion claims.
|
Subject |
getSubject()
Gets the subject.
|
static JWTAssertionClaimsSet |
parse(net.minidev.json.JSONObject jsonObject)
Parses a JWT bearer assertion claims set from the specified JSON
object.
|
static JWTAssertionClaimsSet |
parse(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
Parses a JWT bearer assertion claims set from the specified JWT
claims set.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this JWT bearer assertion
claims set.
|
com.nimbusds.jwt.JWTClaimsSet |
toJWTClaimsSet()
Returns a JSON Web Token (JWT) claims set representation of this
JWT bearer assertion claims set.
|
public JWTAssertionClaimsSet(Issuer iss, Subject sub, Audience aud)
iss
- The issuer identifier. Must not be null
.sub
- The subject. Must not be null
.aud
- The audience identifier, typically the URI of the
authorisation server's Token endpoint. Must not be
null
.public JWTAssertionClaimsSet(Issuer iss, Subject sub, List<Audience> aud, Date exp, Date nbf, Date iat, JWTID jti, Map<String,Object> other)
iss
- The issuer identifier. Must not be null
.sub
- The subject. Must not be null
.aud
- The audience, typically including the URI 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.other
- Other custom claims to include, null
if none.public static Set<String> getReservedClaimsNames()
public Issuer getIssuer()
iss
claim.public Subject getSubject()
sub
claim.public List<Audience> getAudience()
aud
claim.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 Map<String,Object> getCustomClaims()
null
if not specified.public net.minidev.json.JSONObject toJSONObject()
public com.nimbusds.jwt.JWTClaimsSet toJWTClaimsSet()
public static JWTAssertionClaimsSet 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
JWT bearer assertion claims set.public static JWTAssertionClaimsSet parse(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) throws ParseException
jwtClaimsSet
- The JWT claims set. Must not be null
.ParseException
- If the JWT claims set couldn't be parsed to a
JWT bearer assertion claims set.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.