public static class OAuth2TokenIntrospection.Builder
extends java.lang.Object
OAuth2TokenIntrospection.| Modifier and Type | Method and Description |
|---|---|
OAuth2TokenIntrospection.Builder |
active(boolean active)
Sets the indicator of whether or not the presented token is currently active, REQUIRED.
|
OAuth2TokenIntrospection.Builder |
audience(java.lang.String audience)
Add the identifier representing the intended audience for this token, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
audiences(java.util.function.Consumer<java.util.List<java.lang.String>> audiencesConsumer)
A
Consumer of the intended audience(s) for this token,
allowing the ability to add, replace, or remove, OPTIONAL. |
OAuth2TokenIntrospection |
build()
Validate the claims and build the
OAuth2TokenIntrospection. |
OAuth2TokenIntrospection.Builder |
claim(java.lang.String name,
java.lang.Object value)
Sets the claim.
|
OAuth2TokenIntrospection.Builder |
claims(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> claimsConsumer)
Provides access to every
claim(String, Object) declared so far with
the possibility to add, replace, or remove. |
OAuth2TokenIntrospection.Builder |
clientId(java.lang.String clientId)
Sets the client identifier for the OAuth 2.0 client that requested this token, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
expiresAt(java.time.Instant expiresAt)
Sets the time indicating when this token will expire, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
id(java.lang.String jti)
Sets the identifier for the token, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
issuedAt(java.time.Instant issuedAt)
Sets the time indicating when this token was originally issued, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
issuer(java.lang.String issuer)
Sets the issuer of this token, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
notBefore(java.time.Instant notBefore)
Sets the time indicating when this token is not to be used before, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
scope(java.lang.String scope)
Add the scope associated with this token, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
scopes(java.util.function.Consumer<java.util.List<java.lang.String>> scopesConsumer)
A
Consumer of the scope(s) associated with this token,
allowing the ability to add, replace, or remove, OPTIONAL. |
OAuth2TokenIntrospection.Builder |
subject(java.lang.String subject)
Sets the subject of the token, usually a machine-readable identifier
of the resource owner who authorized this token, OPTIONAL.
|
OAuth2TokenIntrospection.Builder |
tokenType(java.lang.String tokenType)
Sets the token type (e.g.
|
OAuth2TokenIntrospection.Builder |
username(java.lang.String username)
Sets the human-readable identifier for the resource owner who authorized this token, OPTIONAL.
|
public OAuth2TokenIntrospection.Builder active(boolean active)
active - true if the token is currently active, false otherwiseOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder scope(java.lang.String scope)
scope - the scope associated with this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder scopes(java.util.function.Consumer<java.util.List<java.lang.String>> scopesConsumer)
Consumer of the scope(s) associated with this token,
allowing the ability to add, replace, or remove, OPTIONAL.scopesConsumer - a Consumer of the scope(s) associated with this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder clientId(java.lang.String clientId)
clientId - the client identifier for the OAuth 2.0 client that requested this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder username(java.lang.String username)
username - the human-readable identifier for the resource owner who authorized this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder tokenType(java.lang.String tokenType)
tokenType - the token typeOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder expiresAt(java.time.Instant expiresAt)
expiresAt - the time indicating when this token will expireOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder issuedAt(java.time.Instant issuedAt)
issuedAt - the time indicating when this token was originally issuedOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder notBefore(java.time.Instant notBefore)
notBefore - the time indicating when this token is not to be used beforeOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder subject(java.lang.String subject)
subject - the subject of the tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder audience(java.lang.String audience)
audience - the identifier representing the intended audience for this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder audiences(java.util.function.Consumer<java.util.List<java.lang.String>> audiencesConsumer)
Consumer of the intended audience(s) for this token,
allowing the ability to add, replace, or remove, OPTIONAL.audiencesConsumer - a Consumer of the intended audience(s) for this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder issuer(java.lang.String issuer)
issuer - the issuer of this tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder id(java.lang.String jti)
jti - the identifier for the tokenOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder claim(java.lang.String name, java.lang.Object value)
name - the claim namevalue - the claim valueOAuth2TokenIntrospection.Builder for further configurationpublic OAuth2TokenIntrospection.Builder claims(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> claimsConsumer)
claim(String, Object) declared so far with
the possibility to add, replace, or remove.claimsConsumer - a Consumer of the claimsOAuth2TokenIntrospection.Builder for further configurationspublic OAuth2TokenIntrospection build()
OAuth2TokenIntrospection.
The following claims are REQUIRED: active
OAuth2TokenIntrospection