Class OAuth2TokenIntrospection.Builder
java.lang.Object
org.springframework.security.oauth2.server.authorization.OAuth2TokenIntrospection.Builder
- Enclosing class:
- OAuth2TokenIntrospection
A builder for
OAuth2TokenIntrospection
.-
Method Summary
Modifier and TypeMethodDescriptionactive
(boolean active) Sets the indicator of whether or not the presented token is currently active, REQUIRED.Add the identifier representing the intended audience for this token, OPTIONAL.AConsumer
of the intended audience(s) for this token, allowing the ability to add, replace, or remove, OPTIONAL.build()
Validate the claims and build theOAuth2TokenIntrospection
.Sets the claim.Provides access to everyclaim(String, Object)
declared so far with the possibility to add, replace, or remove.Sets the client identifier for the OAuth 2.0 client that requested this token, OPTIONAL.Sets the time indicating when this token will expire, OPTIONAL.Sets the identifier for the token, OPTIONAL.Sets the time indicating when this token was originally issued, OPTIONAL.Sets the issuer of this token, OPTIONAL.Sets the time indicating when this token is not to be used before, OPTIONAL.Add the scope associated with this token, OPTIONAL.AConsumer
of the scope(s) associated with this token, allowing the ability to add, replace, or remove, OPTIONAL.Sets the subject of the token, usually a machine-readable identifier of the resource owner who authorized this token, OPTIONAL.Sets the token type (e.g.Sets the human-readable identifier for the resource owner who authorized this token, OPTIONAL.
-
Method Details
-
active
Sets the indicator of whether or not the presented token is currently active, REQUIRED.- Parameters:
active
-true
if the token is currently active,false
otherwise- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
scope
Add the scope associated with this token, OPTIONAL.- Parameters:
scope
- the scope associated with this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
scopes
AConsumer
of the scope(s) associated with this token, allowing the ability to add, replace, or remove, OPTIONAL.- Parameters:
scopesConsumer
- aConsumer
of the scope(s) associated with this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
clientId
Sets the client identifier for the OAuth 2.0 client that requested this token, OPTIONAL.- Parameters:
clientId
- the client identifier for the OAuth 2.0 client that requested this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
username
Sets the human-readable identifier for the resource owner who authorized this token, OPTIONAL.- Parameters:
username
- the human-readable identifier for the resource owner who authorized this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
tokenType
Sets the token type (e.g. bearer), OPTIONAL.- Parameters:
tokenType
- the token type- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
expiresAt
Sets the time indicating when this token will expire, OPTIONAL.- Parameters:
expiresAt
- the time indicating when this token will expire- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
issuedAt
Sets the time indicating when this token was originally issued, OPTIONAL.- Parameters:
issuedAt
- the time indicating when this token was originally issued- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
notBefore
Sets the time indicating when this token is not to be used before, OPTIONAL.- Parameters:
notBefore
- the time indicating when this token is not to be used before- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
subject
Sets the subject of the token, usually a machine-readable identifier of the resource owner who authorized this token, OPTIONAL.- Parameters:
subject
- the subject of the token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
audience
Add the identifier representing the intended audience for this token, OPTIONAL.- Parameters:
audience
- the identifier representing the intended audience for this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
audiences
AConsumer
of the intended audience(s) for this token, allowing the ability to add, replace, or remove, OPTIONAL.- Parameters:
audiencesConsumer
- aConsumer
of the intended audience(s) for this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
issuer
Sets the issuer of this token, OPTIONAL.- Parameters:
issuer
- the issuer of this token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
id
Sets the identifier for the token, OPTIONAL.- Parameters:
jti
- the identifier for the token- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
claim
Sets the claim.- Parameters:
name
- the claim namevalue
- the claim value- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configuration
-
claims
Provides access to everyclaim(String, Object)
declared so far with the possibility to add, replace, or remove.- Parameters:
claimsConsumer
- aConsumer
of the claims- Returns:
- the
OAuth2TokenIntrospection.Builder
for further configurations
-
build
Validate the claims and build theOAuth2TokenIntrospection
.The following claims are REQUIRED:
active
- Returns:
- the
OAuth2TokenIntrospection
-