Package com.nimbusds.oauth2.sdk
Class TokenIntrospectionSuccessResponse.Builder
java.lang.Object
com.nimbusds.oauth2.sdk.TokenIntrospectionSuccessResponse.Builder
- Enclosing class:
- TokenIntrospectionSuccessResponse
Builder for constructing token introspection success responses.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(boolean active) Creates a new token introspection success response builder.Builder
(TokenIntrospectionSuccessResponse response) Creates a new token introspection success response builder with the parameters of the specified response. -
Method Summary
Modifier and TypeMethodDescriptionSets the token audience.authorizationDetails
(List<AuthorizationDetail> authorizationDetails) Sets the Rich Authorisation Request (RAR) details.build()
Builds a new token introspection success response.Sets the identifier for the OAuth 2.0 client that requested the token.expirationTime
(Date exp) Sets the token expiration time.Sets the token issuer.Sets the token issue time.Sets the JSON Web Key (JWK) SHA-256 thumbprint confirmation, for OAuth 2.0 DPoP.Sets the token identifier.notBeforeTime
(Date nbf) Sets the token not-before time.Sets a custom parameter.Sets the token scope.Sets the token subject.tokenType
(AccessTokenType tokenType) Sets the token type.Sets the username of the resource owner who authorised the token.Sets the client X.509 certificate confirmation, for a mutual TLS client certificate bound access token.x509CertificateSHA256Thumbprint
(com.nimbusds.jose.util.Base64URL x5t) Deprecated.
-
Constructor Details
-
Builder
Creates a new token introspection success response builder.- Parameters:
active
-true
if the token is active, elsefalse
.
-
Builder
Creates a new token introspection success response builder with the parameters of the specified response.- Parameters:
response
- The response which parameters to use. Notnull
.
-
-
Method Details
-
scope
Sets the token scope. Corresponds to thescope
parameter.- Parameters:
scope
- The token scope,null
if not specified.- Returns:
- This builder.
-
clientID
Sets the identifier for the OAuth 2.0 client that requested the token. Corresponds to theclient_id
parameter.- Parameters:
clientID
- The client identifier,null
if not specified.- Returns:
- This builder.
-
username
Sets the username of the resource owner who authorised the token. Corresponds to theusername
parameter.- Parameters:
username
- The username,null
if not specified.- Returns:
- This builder.
-
tokenType
Sets the token type. Corresponds to thetoken_type
parameter.- Parameters:
tokenType
- The token type,null
if not specified.- Returns:
- This builder.
-
expirationTime
Sets the token expiration time. Corresponds to theexp
parameter.- Parameters:
exp
- The token expiration time,null
if not specified.- Returns:
- This builder.
-
issueTime
Sets the token issue time. Corresponds to theiat
parameter.- Parameters:
iat
- The token issue time,null
if not specified.- Returns:
- This builder.
-
notBeforeTime
Sets the token not-before time. Corresponds to thenbf
parameter.- Parameters:
nbf
- The token not-before time,null
if not specified.- Returns:
- This builder.
-
subject
Sets the token subject. Corresponds to thesub
parameter.- Parameters:
sub
- The token subject,null
if not specified.- Returns:
- This builder.
-
audience
Sets the token audience. Corresponds to theaud
parameter.- Parameters:
audList
- The token audience,null
if not specified.- Returns:
- This builder.
-
issuer
Sets the token issuer. Corresponds to theiss
parameter.- Parameters:
iss
- The token issuer,null
if not specified.- Returns:
- This builder.
-
jwtID
Sets the token identifier. Corresponds to thejti
parameter.- Parameters:
jti
- The token identifier,null
if not specified.- Returns:
- This builder.
-
x509CertificateSHA256Thumbprint
@Deprecated public TokenIntrospectionSuccessResponse.Builder x509CertificateSHA256Thumbprint(com.nimbusds.jose.util.Base64URL x5t) Deprecated.Sets the client X.509 certificate SHA-256 thumbprint, for a mutual TLS client certificate bound access token. Corresponds to thecnf.x5t#S256
parameter.- Parameters:
x5t
- The client X.509 certificate SHA-256 thumbprint,null
if not specified.- Returns:
- This builder.
-
x509CertificateConfirmation
public TokenIntrospectionSuccessResponse.Builder x509CertificateConfirmation(X509CertificateConfirmation cnf) Sets the client X.509 certificate confirmation, for a mutual TLS client certificate bound access token. Corresponds to thecnf.x5t#S256
parameter.- Parameters:
cnf
- The client X.509 certificate confirmation,null
if not specified.- Returns:
- This builder.
-
jwkThumbprintConfirmation
public TokenIntrospectionSuccessResponse.Builder jwkThumbprintConfirmation(JWKThumbprintConfirmation cnf) Sets the JSON Web Key (JWK) SHA-256 thumbprint confirmation, for OAuth 2.0 DPoP. Corresponds to thecnf.jkt
parameter.- Parameters:
cnf
- The JWK SHA-256 thumbprint confirmation,null
if not specified.- Returns:
- This builder.
-
authorizationDetails
public TokenIntrospectionSuccessResponse.Builder authorizationDetails(List<AuthorizationDetail> authorizationDetails) Sets the Rich Authorisation Request (RAR) details. Corresponds to theauthorization_details
parameter.- Parameters:
authorizationDetails
- The authorisation details,null
if not specified.- Returns:
- This builder.
-
parameter
Sets a custom parameter.- Parameters:
name
- The parameter name. Must not benull
.value
- The parameter value. Should map to a JSON type. Ifnull
not specified.- Returns:
- This builder.
-
build
Builds a new token introspection success response.- Returns:
- The token introspection success response.
-