@Immutable public class IDTokenSpec extends OptionalTokenSpec
Modifier and Type | Field and Description |
---|---|
static IDTokenSpec |
NONE
None (no issue) ID token specification.
|
Constructor and Description |
---|
IDTokenSpec()
Creates a new default ID token specification (no issue).
|
IDTokenSpec(boolean issue,
long lifetime,
Date authTime,
com.nimbusds.openid.connect.sdk.claims.ACR acr,
List<com.nimbusds.openid.connect.sdk.claims.AMR> amrList,
com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
Creates a new ID token specification.
|
IDTokenSpec(boolean issue,
long lifetime,
com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
Creates a new ID token specification.
|
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.
|
static IDTokenSpec |
parse(net.minidev.json.JSONObject jsonObject)
Parses an ID token specification from the specified JSON object.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this token specification.
|
issue
getAudience, getImpersonatedSubject, getLifetime, toString
public static final IDTokenSpec NONE
public IDTokenSpec()
public IDTokenSpec(boolean issue, long lifetime, com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
issue
- Controls the ID token issue. If
true
an ID token must be issued,
false
to prohibit issue.lifetime
- The ID token lifetime, in seconds, zero
if not specified (to let the Connect2id
server apply the default configured
lifetime for ID tokens).impersonatedSubject
- The subject in impersonation and
delegation cases, null
if not
applicable.public IDTokenSpec(boolean issue, long lifetime, Date authTime, com.nimbusds.openid.connect.sdk.claims.ACR acr, List<com.nimbusds.openid.connect.sdk.claims.AMR> amrList, com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
issue
- Controls the ID token issue. If
true
an ID token must be issued,
false
to prohibit issue.lifetime
- The ID token lifetime, in seconds, zero
if not specified (to let the Connect2id
server apply the default configured
lifetime for ID tokens).authTime
- The time of the subject authentication.
If null
it will be set to now.
Applies only if an ID token is issued.acr
- The Authentication Context Class
Reference (ACR), null
if not
specified. Applies only if an ID token is
issued.amrList
- The Authentication Methods Reference
(AMR) list, null
if not
specified. Applies only if an ID token is
issued.impersonatedSubject
- The subject in impersonation and
delegation cases, null
if not
applicable.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 net.minidev.json.JSONObject toJSONObject()
TokenSpec
toJSONObject
in class OptionalTokenSpec
public static IDTokenSpec parse(net.minidev.json.JSONObject jsonObject) throws com.nimbusds.oauth2.sdk.ParseException
jsonObject
- The JSON object. Must not be null
.com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.Copyright © 2021 Connect2id Ltd.. All rights reserved.