public final class MutableAccessTokenAuthorization extends Object implements AccessTokenAuthorization
Constructor and Description |
---|
MutableAccessTokenAuthorization()
Creates a new empty mutable access token authorisation.
|
MutableAccessTokenAuthorization(AccessTokenAuthorization source)
Creates a new mutable access token authorisation from the specified
one.
|
Modifier and Type | Method and Description |
---|---|
com.nimbusds.oauth2.sdk.id.Actor |
getActor()
Returns the access token actor, in impersonation and delegation
scenarios.
|
List<com.nimbusds.oauth2.sdk.id.Audience> |
getAudienceList()
Returns the audience list of the access token, which may be the
logical names of the intended resource servers.
|
Set<String> |
getClaimNames()
Returns the names of the consented OpenID claims to be accessed at
the UserInfo endpoint.
|
net.minidev.json.JSONObject |
getClaimsData()
Returns the optional claims fulfillment data.
|
List<com.nimbusds.langtag.LangTag> |
getClaimsLocales()
Returns the preferred locales for the consented OpenID claims.
|
com.nimbusds.oauth2.sdk.auth.X509CertificateConfirmation |
getClientCertificateConfirmation()
Returns the client X.509 certificate confirmation (SHA-256
thumbprint) for mutual TLS.
|
com.nimbusds.oauth2.sdk.id.ClientID |
getClientID()
Returns the identifier of the client to which the access token is
issued.
|
net.minidev.json.JSONObject |
getData()
Returns the optional data for the access token.
|
Instant |
getExpirationTime()
Returns the expiration time of the access token.
|
com.nimbusds.oauth2.sdk.id.Issuer |
getIssuer()
Returns the issuer of the access token.
|
Instant |
getIssueTime()
Returns the issue time of the access token.
|
com.nimbusds.oauth2.sdk.dpop.JWKThumbprintConfirmation |
getJWKThumbprintConfirmation()
Returns the JWK SHA-256 thumbprint confirmation for DPoP.
|
com.nimbusds.oauth2.sdk.id.JWTID |
getJWTID()
Returns the JSON Web Token (JWT) identifier of the access token.
|
com.nimbusds.oauth2.sdk.id.Subject |
getLocalSubject()
Returns the access token local subject.
|
Map<String,Object> |
getOtherTopLevelParameters()
Returns a map of other top-level parameters.
|
net.minidev.json.JSONObject |
getPresetClaims()
Returns the preset OpenID claims to be included in the UserInfo
response.
|
com.nimbusds.oauth2.sdk.Scope |
getScope()
Returns the scope of the access token.
|
com.nimbusds.oauth2.sdk.id.Subject |
getSubject()
Returns the access token subject.
|
com.nimbusds.openid.connect.sdk.SubjectType |
getSubjectType()
Returns the access token subject type.
|
String |
toString() |
MutableAccessTokenAuthorization |
withActor(com.nimbusds.oauth2.sdk.id.Actor act)
Sets the access token actor, in impersonation and delegation
scenarios.
|
MutableAccessTokenAuthorization |
withAudienceList(List<com.nimbusds.oauth2.sdk.id.Audience> audList)
Sets the audience list of the access token, which may be the logical
names of the intended resource servers.
|
MutableAccessTokenAuthorization |
withClaimNames(Set<String> claimNames)
Sets the names of the consented OpenID claims to be accessed at
the UserInfo endpoint.
|
MutableAccessTokenAuthorization |
withClaimsData(net.minidev.json.JSONObject claimsData)
Sets the claims fulfillment data for the claims source at the
UserInfo endpoint.
|
MutableAccessTokenAuthorization |
withClaimsLocales(List<com.nimbusds.langtag.LangTag> claimsLocales)
Sets the preferred locales for the consented OpenID claims.
|
MutableAccessTokenAuthorization |
withClientCertificateConfirmation(com.nimbusds.oauth2.sdk.auth.X509CertificateConfirmation cnfX5t)
Sets the client X.509 certificate confirmation (SHA-256 thumbprint)
for mutual TLS.
|
MutableAccessTokenAuthorization |
withClientID(com.nimbusds.oauth2.sdk.id.ClientID clientID)
Sets the identifier of the client to which the access token is
issued.
|
MutableAccessTokenAuthorization |
withData(net.minidev.json.JSONObject data)
Sets the optional data for the access token.
|
MutableAccessTokenAuthorization |
withExpirationTime(Instant exp)
Sets the expiration time of the access token.
|
MutableAccessTokenAuthorization |
withIssuer(com.nimbusds.oauth2.sdk.id.Issuer iss)
Sets the issuer of the access token.
|
MutableAccessTokenAuthorization |
withIssueTime(Instant iat)
Sets the issue time of the access token.
|
MutableAccessTokenAuthorization |
withJWKThumbprintConfirmation(com.nimbusds.oauth2.sdk.dpop.JWKThumbprintConfirmation cnfJkt)
Sets the JWK SHA-256 thumbprint confirmation for DPoP.
|
MutableAccessTokenAuthorization |
withJWTID(com.nimbusds.oauth2.sdk.id.JWTID jti)
Sets the JSON Web Token (JWT) identifier of the access token.
|
MutableAccessTokenAuthorization |
withLocalSubject(com.nimbusds.oauth2.sdk.id.Subject localSubject)
Sets the access token local (system) subject.
|
MutableAccessTokenAuthorization |
withOtherTopLevelParameters(Map<String,Object> params)
Sets the other top-level parameters.
|
MutableAccessTokenAuthorization |
withPresetClaims(net.minidev.json.JSONObject presetClaims)
Sets the preset OpenID claims to be included in the UserInfo
response.
|
MutableAccessTokenAuthorization |
withScope(com.nimbusds.oauth2.sdk.Scope scope)
Sets the scope of the access token.
|
MutableAccessTokenAuthorization |
withSubject(com.nimbusds.oauth2.sdk.id.Subject sub)
Sets the access token subject.
|
MutableAccessTokenAuthorization |
withSubjectType(com.nimbusds.openid.connect.sdk.SubjectType subjectType)
Sets the access token subject type.
|
public MutableAccessTokenAuthorization()
public MutableAccessTokenAuthorization(AccessTokenAuthorization source)
source
- The source access token authorisation. Must not be
null
.public MutableAccessTokenAuthorization withSubject(com.nimbusds.oauth2.sdk.id.Subject sub)
sub
- The subject, null
if not specified.public com.nimbusds.oauth2.sdk.id.Subject getSubject()
AccessTokenAuthorization
getSubject
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withActor(com.nimbusds.oauth2.sdk.id.Actor act)
act
- The actor, null
if not specified.public com.nimbusds.oauth2.sdk.id.Actor getActor()
AccessTokenAuthorization
getActor
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withClientID(com.nimbusds.oauth2.sdk.id.ClientID clientID)
clientID
- The client identifier, null
if not
specified.public com.nimbusds.oauth2.sdk.id.ClientID getClientID()
AccessTokenAuthorization
getClientID
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withScope(com.nimbusds.oauth2.sdk.Scope scope)
scope
- The scope, null
if not specified.public com.nimbusds.oauth2.sdk.Scope getScope()
AccessTokenAuthorization
getScope
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withExpirationTime(Instant exp)
exp
- The expiration time, null
if not specified.public Instant getExpirationTime()
AccessTokenAuthorization
getExpirationTime
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withIssueTime(Instant iat)
iat
- The issue time, null
if not specified.public Instant getIssueTime()
AccessTokenAuthorization
getIssueTime
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withIssuer(com.nimbusds.oauth2.sdk.id.Issuer iss)
iss
- The issuer, null
if not specified.public com.nimbusds.oauth2.sdk.id.Issuer getIssuer()
AccessTokenAuthorization
getIssuer
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withAudienceList(List<com.nimbusds.oauth2.sdk.id.Audience> audList)
audList
- The audience list, null
if not specified.public List<com.nimbusds.oauth2.sdk.id.Audience> getAudienceList()
AccessTokenAuthorization
getAudienceList
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withSubjectType(com.nimbusds.openid.connect.sdk.SubjectType subjectType)
subjectType
- The subject type, null
if not specified
(may imply public
).public com.nimbusds.openid.connect.sdk.SubjectType getSubjectType()
AccessTokenAuthorization
getSubjectType
in interface AccessTokenAuthorization
null
if not specified (may imply
public
).public MutableAccessTokenAuthorization withLocalSubject(com.nimbusds.oauth2.sdk.id.Subject localSubject)
localSubject
- The local (system) subject, null
if not
specified or for a pairwise
subject type
that
couldn't be reversed.public com.nimbusds.oauth2.sdk.id.Subject getLocalSubject()
AccessTokenAuthorization
AccessTokenAuthorization.getSubject()
value unless the subject type
is pairwise.
Use this method if there is a need to get the local (system) subject for an access token which subject was made pairwise for its audience (resource server).
Note, an access token which subject is made pairwise must not have its local subject exposed in introspection responses intended for the token audience!
getLocalSubject
in interface AccessTokenAuthorization
null
if not specified or for a
pairwise subject type
that
couldn't be reversed.public MutableAccessTokenAuthorization withJWTID(com.nimbusds.oauth2.sdk.id.JWTID jti)
jti
- The JWT ID, null
if not specified or applicable.public com.nimbusds.oauth2.sdk.id.JWTID getJWTID()
AccessTokenAuthorization
getJWTID
in interface AccessTokenAuthorization
null
if not specified or applicable.public MutableAccessTokenAuthorization withClaimNames(Set<String> claimNames)
claimNames
- The claim names, null
if not specified.public Set<String> getClaimNames()
AccessTokenAuthorization
getClaimNames
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withClaimsLocales(List<com.nimbusds.langtag.LangTag> claimsLocales)
claimsLocales
- The preferred claims locales, null
if
not specified.public List<com.nimbusds.langtag.LangTag> getClaimsLocales()
AccessTokenAuthorization
getClaimsLocales
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withPresetClaims(net.minidev.json.JSONObject presetClaims)
presetClaims
- The preset OpenID claims, null
if not
specified.public net.minidev.json.JSONObject getPresetClaims()
AccessTokenAuthorization
getPresetClaims
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withClaimsData(net.minidev.json.JSONObject claimsData)
claimsData
- The claims fulfillment data, null
if not
specified.public net.minidev.json.JSONObject getClaimsData()
AccessTokenAuthorization
getClaimsData
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withData(net.minidev.json.JSONObject data)
data
- The optional data, represented as a JSON object,
null
if not specified.public net.minidev.json.JSONObject getData()
AccessTokenAuthorization
getData
in interface AccessTokenAuthorization
null
if not specified.public MutableAccessTokenAuthorization withClientCertificateConfirmation(com.nimbusds.oauth2.sdk.auth.X509CertificateConfirmation cnfX5t)
cnfX5t
- The client X.509 certificate confirmation,
null
if none.public com.nimbusds.oauth2.sdk.auth.X509CertificateConfirmation getClientCertificateConfirmation()
AccessTokenAuthorization
getClientCertificateConfirmation
in interface AccessTokenAuthorization
null
if
none.public MutableAccessTokenAuthorization withJWKThumbprintConfirmation(com.nimbusds.oauth2.sdk.dpop.JWKThumbprintConfirmation cnfJkt)
cnfJkt
- The JWK thumbprint confirmation, null
if none.public com.nimbusds.oauth2.sdk.dpop.JWKThumbprintConfirmation getJWKThumbprintConfirmation()
AccessTokenAuthorization
getJWKThumbprintConfirmation
in interface AccessTokenAuthorization
null
if none.public MutableAccessTokenAuthorization withOtherTopLevelParameters(Map<String,Object> params)
params
- Other top-level parameters, the values should map to
JSON entities, null
if none.public Map<String,Object> getOtherTopLevelParameters()
AccessTokenAuthorization
getOtherTopLevelParameters
in interface AccessTokenAuthorization
null
if none.Copyright © 2021 Connect2id Ltd.. All rights reserved.