@Immutable public class JWTBearerGrant extends AssertionGrant
Related specifications:
Modifier and Type | Field and Description |
---|---|
static GrantType |
GRANT_TYPE
The grant type.
|
Constructor and Description |
---|
JWTBearerGrant(com.nimbusds.jwt.JWT assertion)
Creates a new JSON Web Token (JWT) bearer assertion grant.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAssertion()
Gets the assertion.
|
com.nimbusds.jwt.JWT |
getJWTAssertion()
Gets the JSON Web Token (JWT) bearer assertion.
|
static JWTBearerGrant |
parse(java.util.Map<java.lang.String,java.lang.String> params)
Parses a JWT bearer grant from the specified parameters.
|
java.util.Map<java.lang.String,java.lang.String> |
toParameters()
Return the parameters for the authorisation grant.
|
getType
public static final GrantType GRANT_TYPE
public JWTBearerGrant(com.nimbusds.jwt.JWT assertion)
assertion
- The JSON Web Token (JWT) assertion. Must not be
null
.public com.nimbusds.jwt.JWT getJWTAssertion()
public java.lang.String getAssertion()
AssertionGrant
getAssertion
in class AssertionGrant
public java.util.Map<java.lang.String,java.lang.String> toParameters()
AuthorizationGrant
toParameters
in class AuthorizationGrant
public static JWTBearerGrant parse(java.util.Map<java.lang.String,java.lang.String> params) throws ParseException
Example:
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer &assertion=eyJhbGciOiJFUzI1NiJ9.eyJpc3Mi[...omitted for brevity...]. J9l-ZhwP[...omitted for brevity...]
params
- The parameters.ParseException
- If parsing failed.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.