public class GrantAuthorization extends Object
grant handler
.Constructor and Description |
---|
GrantAuthorization(com.nimbusds.oauth2.sdk.Scope scope,
List<com.nimbusds.oauth2.sdk.id.Audience> audList,
AccessTokenSpec accessTokenSpec,
net.minidev.json.JSONObject data)
Creates a new authorisation response from a grant handler.
|
Modifier and Type | Method and Description |
---|---|
AccessTokenSpec |
getAccessTokenSpec()
Returns the access token specification.
|
List<com.nimbusds.oauth2.sdk.id.Audience> |
getAudience()
Returns the explicit list of audiences for the access token.
|
net.minidev.json.JSONObject |
getData()
Returns the optional authorisation data as a JSON object.
|
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, AccessTokenSpec accessTokenSpec, net.minidev.json.JSONObject data)
scope
- The authorised scope values. Must not be
null
.audList
- Explicit list of audiences for the access
token, null
if not specified.accessTokenSpec
- The access token specification. Must not be
null
.data
- Optional authorisation data as a JSON
object, 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 AccessTokenSpec getAccessTokenSpec()
public net.minidev.json.JSONObject getData()
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
- If parsing failed.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.