public class GrantAuthorization extends Object
Constructor and Description |
---|
GrantAuthorization(com.nimbusds.oauth2.sdk.Scope scope,
List<com.nimbusds.oauth2.sdk.id.Audience> audList,
long accessTokenLifetime,
com.nimbusds.oauth2.sdk.token.TokenEncoding accessTokenEncoding)
Creates a new authorisation response from a grant handler.
|
Modifier and Type | Method and Description |
---|---|
com.nimbusds.oauth2.sdk.token.TokenEncoding |
getAccessTokenEncoding()
Returns the access token encoding.
|
long |
getAccessTokenLifetime()
Returns the access token lifetime.
|
List<com.nimbusds.oauth2.sdk.id.Audience> |
getAudience()
Returns the explicit list of audiences for the access token.
|
com.nimbusds.oauth2.sdk.Scope |
getScope()
Returns the authorised scope values.
|
static GrantAuthorization |
parse(net.minidev.json.JSONObject jsonObject)
Parses an authorisation response from the specified JSON object
representation.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this authorisation response.
|
public GrantAuthorization(com.nimbusds.oauth2.sdk.Scope scope, List<com.nimbusds.oauth2.sdk.id.Audience> audList, long accessTokenLifetime, com.nimbusds.oauth2.sdk.token.TokenEncoding accessTokenEncoding)
scope
- The authorised scope values. Must not be
null
.audList
- Explicit list of audiences for the access
token, null
if not specified.accessTokenLifetime
- The access token lifetime, in seconds,
zero if not specified.accessTokenEncoding
- The access token encoding, null
if not specified.public com.nimbusds.oauth2.sdk.Scope getScope()
public List<com.nimbusds.oauth2.sdk.id.Audience> getAudience()
null
if not specified.public long getAccessTokenLifetime()
public com.nimbusds.oauth2.sdk.token.TokenEncoding getAccessTokenEncoding()
null
if not specified.public net.minidev.json.JSONObject toJSONObject()
public static GrantAuthorization parse(net.minidev.json.JSONObject jsonObject) throws com.nimbusds.oauth2.sdk.ParseException
jsonObject
- The JSON object to parse. Must not be
null
.com.nimbusds.oauth2.sdk.ParseException
Copyright © 2014 Connect2id Ltd.. All Rights Reserved.