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.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.- 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.- Parameters:
clientID
- The client identifier,null
if not specified.- Returns:
- This builder.
-
username
Sets the username of the resource owner who authorised the token.- Parameters:
username
- The username,null
if not specified.- Returns:
- This builder.
-
tokenType
Sets the token type.- Parameters:
tokenType
- The token type,null
if not specified.- Returns:
- This builder.
-
expirationTime
Sets the token expiration time.- Parameters:
exp
- The token expiration time,null
if not specified.- Returns:
- This builder.
-
issueTime
Sets the token issue time.- Parameters:
iat
- The token issue time,null
if not specified.- Returns:
- This builder.
-
notBeforeTime
Sets the token not-before time.- Parameters:
nbf
- The token not-before time,null
if not specified.- Returns:
- This builder.
-
subject
Sets the token subject.- Parameters:
sub
- The token subject,null
if not specified.- Returns:
- This builder.
-
audience
Sets the token audience.- Parameters:
audList
- The token audience,null
if not specified.- Returns:
- This builder.
-
issuer
Sets the token issuer.- Parameters:
iss
- The token issuer,null
if not specified.- Returns:
- This builder.
-
jwtID
Sets the token identifier.- 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
claim.- 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
claim.- 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
claim.- Parameters:
cnf
- The JWK SHA-256 thumbprint confirmation,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.
-