@Immutable public final 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 |
---|---|
String |
getAssertion()
Gets the assertion.
|
com.nimbusds.jwt.JWT |
getJWTAssertion()
Gets the JSON Web Token (JWT) bearer assertion.
|
static JWTBearerGrant |
parse(Map<String,String> params)
Parses a JWT bearer grant from the specified parameters.
|
Map<String,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 String getAssertion()
AssertionGrant
getAssertion
in class AssertionGrant
public Map<String,String> toParameters()
AuthorizationGrant
toParameters
in class AuthorizationGrant
public static JWTBearerGrant parse(Map<String,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.