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-trueif 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 thescopeparameter.- Parameters:
scope- The token scope,nullif not specified.- Returns:
- This builder.
-
clientID
Sets the identifier for the OAuth 2.0 client that requested the token. Corresponds to theclient_idparameter.- Parameters:
clientID- The client identifier,nullif not specified.- Returns:
- This builder.
-
username
Sets the username of the resource owner who authorised the token. Corresponds to theusernameparameter.- Parameters:
username- The username,nullif not specified.- Returns:
- This builder.
-
tokenType
Sets the token type. Corresponds to thetoken_typeparameter.- Parameters:
tokenType- The token type,nullif not specified.- Returns:
- This builder.
-
expirationTime
Sets the token expiration time. Corresponds to theexpparameter.- Parameters:
exp- The token expiration time,nullif not specified.- Returns:
- This builder.
-
issueTime
Sets the token issue time. Corresponds to theiatparameter.- Parameters:
iat- The token issue time,nullif not specified.- Returns:
- This builder.
-
notBeforeTime
Sets the token not-before time. Corresponds to thenbfparameter.- Parameters:
nbf- The token not-before time,nullif not specified.- Returns:
- This builder.
-
subject
Sets the token subject. Corresponds to thesubparameter.- Parameters:
sub- The token subject,nullif not specified.- Returns:
- This builder.
-
audience
Sets the token audience. Corresponds to theaudparameter.- Parameters:
audList- The token audience,nullif not specified.- Returns:
- This builder.
-
issuer
Sets the token issuer. Corresponds to theissparameter.- Parameters:
iss- The token issuer,nullif not specified.- Returns:
- This builder.
-
jwtID
Sets the token identifier. Corresponds to thejtiparameter.- Parameters:
jti- The token identifier,nullif 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#S256parameter.- Parameters:
x5t- The client X.509 certificate SHA-256 thumbprint,nullif 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#S256parameter.- Parameters:
cnf- The client X.509 certificate confirmation,nullif 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.jktparameter.- Parameters:
cnf- The JWK SHA-256 thumbprint confirmation,nullif not specified.- Returns:
- This builder.
-
authorizationDetails
public TokenIntrospectionSuccessResponse.Builder authorizationDetails(List<AuthorizationDetail> authorizationDetails) Sets the Rich Authorisation Request (RAR) details. Corresponds to theauthorization_detailsparameter.- Parameters:
authorizationDetails- The authorisation details,nullif 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. Ifnullnot specified.- Returns:
- This builder.
-
build
Builds a new token introspection success response.- Returns:
- The token introspection success response.
-