@Immutable public class JWTAssertionDetails extends AssertionDetails
Used for client secret JWT
and
private key JWT
authentication at the Token endpoint
as well as JWT bearer
assertion grants
.
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 |
---|
JWTAssertionDetails(Issuer iss,
Subject sub,
Audience aud)
Creates a new JWT bearer assertion details (claims set) instance.
|
JWTAssertionDetails(Issuer iss,
Subject sub,
java.util.List<Audience> aud,
java.util.Date exp,
java.util.Date nbf,
java.util.Date iat,
JWTID jti,
java.util.Map<java.lang.String,java.lang.Object> other)
Creates a new JWT bearer assertion details (claims set) instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getCustomClaims()
Returns the custom claims.
|
JWTID |
getJWTID()
Returns the optional assertion identifier, as a JWT ID.
|
java.util.Date |
getNotBeforeTime()
Returns the optional not-before time.
|
static java.util.Set<java.lang.String> |
getReservedClaimsNames()
Gets the names of the reserved JWT bearer assertion claims.
|
static JWTAssertionDetails |
parse(net.minidev.json.JSONObject jsonObject)
Parses a JWT bearer assertion details (claims set) instance from the
specified JSON object.
|
static JWTAssertionDetails |
parse(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
Parses a JWT bearer assertion details instance from the specified
JWT claims set.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this JWT bearer assertion
details.
|
com.nimbusds.jwt.JWTClaimsSet |
toJWTClaimsSet()
Returns a JSON Web Token (JWT) claims set representation of this
JWT bearer assertion details.
|
getAudience, getExpirationTime, getID, getIssuer, getIssueTime, getSubject
public JWTAssertionDetails(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 JWTAssertionDetails(Issuer iss, Subject sub, java.util.List<Audience> aud, java.util.Date exp, java.util.Date nbf, java.util.Date iat, JWTID jti, java.util.Map<java.lang.String,java.lang.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 java.util.Set<java.lang.String> getReservedClaimsNames()
public java.util.Date getNotBeforeTime()
nbf
claim.null
if not specified.public JWTID getJWTID()
jti
claim.null
if not specified.AssertionDetails.getID()
public java.util.Map<java.lang.String,java.lang.Object> getCustomClaims()
null
if not specified.public net.minidev.json.JSONObject toJSONObject()
public com.nimbusds.jwt.JWTClaimsSet toJWTClaimsSet()
public static JWTAssertionDetails 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 details instance.public static JWTAssertionDetails 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 details instance.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.