Modifier and Type | Method | Description |
---|---|---|
static boolean |
impliesAuthorizationErrorResponse(com.nimbusds.jwt.JWT jwt) |
Returns
true if the specified JWT-secured authorisation
response implies an error response. |
static boolean |
impliesAuthorizationErrorResponse(String jwtString) |
Returns
true if the specified JWT-secured authorisation
response implies an error response. |
static com.nimbusds.jwt.JWTClaimsSet |
toJWTClaimsSet(Issuer iss,
ClientID aud,
Date exp,
AuthorizationResponse response) |
Creates a JSON Web Token (JWT) claims set for the specified
authorisation success response.
|
static Map<String,List<String>> |
toMultiValuedStringParameters(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) |
Returns a multi-valued map representation of the specified JWT
claims set.
|
public static com.nimbusds.jwt.JWTClaimsSet toJWTClaimsSet(Issuer iss, ClientID aud, Date exp, AuthorizationResponse response)
iss
- The OAuth 2.0 authorisation server issuer. Must not
be null
.aud
- The client ID. Must not be null
.exp
- The JWT expiration time. Must not be null
.response
- The plain authorisation response to use its
parameters. Must not be null
.public static Map<String,List<String>> toMultiValuedStringParameters(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
jwtClaimsSet
- The JWT claims set. Must not be null
.public static boolean impliesAuthorizationErrorResponse(String jwtString) throws ParseException
true
if the specified JWT-secured authorisation
response implies an error response. Note that the JWT is not
validated in any way!jwtString
- The JWT-secured authorisation response string. Must
not be null
.true
if an error is implied by the presence of the
error
claim, else false
(also for encrypted
JWTs which payload cannot be inspected without decrypting
first).ParseException
- If the JWT is invalid or plain (unsecured).public static boolean impliesAuthorizationErrorResponse(com.nimbusds.jwt.JWT jwt) throws ParseException
true
if the specified JWT-secured authorisation
response implies an error response. Note that the JWT is not
validated in any way!jwt
- The JWT-secured authorisation response. Must not be
null
.true
if an error is implied by the presence of the
error
claim, else false
(also for encrypted
JWTs which payload cannot be inspected without decrypting
first).ParseException
- If the JWT is plain (unsecured).Copyright © 2019 Connect2id Ltd.. All rights reserved.