@Immutable public class SubjectAuthorization extends GrantAuthorization
GrantHandler
specifying a subject (end-user) and permitting ID token issue.
Required authorisation details:
All other parameters are optional or have suitable defaults.
Constructor and Description |
---|
SubjectAuthorization(com.nimbusds.oauth2.sdk.id.Subject subject,
com.nimbusds.oauth2.sdk.Scope scope,
AccessTokenSpec accessTokenSpec,
IDTokenSpec idTokenSpec,
ClaimsSpec claimsSpec,
net.minidev.json.JSONObject data)
Creates a new authorisation for the specified subject.
|
Modifier and Type | Method and Description |
---|---|
com.nimbusds.openid.connect.sdk.claims.ACR |
getACR()
Returns the Authentication Context Class Reference (ACR).
|
List<com.nimbusds.openid.connect.sdk.claims.AMR> |
getAMRList()
Returns The Authentication Methods Reference (AMR) list.
|
Date |
getAuthTime()
Returns the time of the subject authentication.
|
ClaimsSpec |
getClaimsSpec()
Returns the claims specification.
|
IDTokenSpec |
getIDTokenSpec()
Returns the ID token specification.
|
com.nimbusds.oauth2.sdk.id.Subject |
getSubject()
Returns the subject (end-user) identifier.
|
static SubjectAuthorization |
parse(net.minidev.json.JSONObject jsonObject)
Parses a subject authorisation from the specified JSON object.
|
static SubjectAuthorization |
parse(String json)
Parses a subject authorisation from the specified JSON object
string.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this authorisation.
|
getAccessTokenSpec, getAudience, getData, getScope
public SubjectAuthorization(com.nimbusds.oauth2.sdk.id.Subject subject, com.nimbusds.oauth2.sdk.Scope scope, AccessTokenSpec accessTokenSpec, IDTokenSpec idTokenSpec, ClaimsSpec claimsSpec, net.minidev.json.JSONObject data)
subject
- The subject (end-user) identifier. Must not
be null
.scope
- The authorised scope values. Must not be
null
.accessTokenSpec
- The access token specification. Must not be
null
.idTokenSpec
- The ID token specification. Must not be
null
.claimsSpec
- The claims specification. Must not be
null
.data
- Additional data as a JSON object,
null
if not specified.public com.nimbusds.oauth2.sdk.id.Subject getSubject()
public Date getAuthTime()
null
it
will be set to now. Applies only if an ID token is issued.public com.nimbusds.openid.connect.sdk.claims.ACR getACR()
null
if not specified. Applies only if an ID token
is issued.public List<com.nimbusds.openid.connect.sdk.claims.AMR> getAMRList()
null
if not specified. Applies only if an ID token
is issued.public IDTokenSpec getIDTokenSpec()
public ClaimsSpec getClaimsSpec()
public net.minidev.json.JSONObject toJSONObject()
GrantAuthorization
toJSONObject
in class GrantAuthorization
public static SubjectAuthorization 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.public static SubjectAuthorization parse(String json) throws com.nimbusds.oauth2.sdk.ParseException
json
- The JSON object string to parse. Must not be
null
.com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.Copyright © 2021 Connect2id Ltd.. All rights reserved.