public class JwtBearerTokenFlow extends Object
| Constructor and Description |
|---|
JwtBearerTokenFlow(OAuth2TokenService tokenService,
OAuth2ServiceEndpointsProvider endpointsProvider,
ClientIdentity clientIdentity) |
| Modifier and Type | Method and Description |
|---|---|
JwtBearerTokenFlow |
attributes(Map<String,String> additionalAuthorizationAttributes)
Adds additional authorization attributes to the request.
|
JwtBearerTokenFlow |
disableCache(boolean disableCache)
Can be used to disable the cache for the flow.
|
OAuth2TokenResponse |
execute()
Executes this flow against the XSUAA endpoint.
|
JwtBearerTokenFlow |
scopes(String... scopes)
Sets the scope attribute for the token request.
|
JwtBearerTokenFlow |
setOpaqueTokenFormat(boolean opaque)
Can be used to change the format of the returned token.
|
JwtBearerTokenFlow |
subdomain(String subdomain)
Set the Subdomain the token is requested for.
|
JwtBearerTokenFlow |
token(String bearerToken)
Sets the bearer token that should be exchanged for another JWT token.
|
JwtBearerTokenFlow |
token(Token token)
Sets the JWT token that should be exchanged for another JWT token.
|
JwtBearerTokenFlow |
zoneId(String zoneId)
Sets the zoneid of the tenant
|
public JwtBearerTokenFlow(@Nonnull OAuth2TokenService tokenService, @Nonnull OAuth2ServiceEndpointsProvider endpointsProvider, @Nonnull ClientIdentity clientIdentity)
public JwtBearerTokenFlow token(@Nonnull String bearerToken)
bearerToken - - the bearer token.public JwtBearerTokenFlow token(@Nonnull Token token)
zoneId(String)} is not required to be used.token - - the Token.public JwtBearerTokenFlow zoneId(String zoneId)
zoneId - - the zoneId.public JwtBearerTokenFlow scopes(@Nonnull String... scopes)
scopes - - one or many scopes as string.public JwtBearerTokenFlow subdomain(String subdomain)
subdomain - - the subdomain.public JwtBearerTokenFlow attributes(Map<String,String> additionalAuthorizationAttributes)
additionalAuthorizationAttributes - - the additional attributes.public JwtBearerTokenFlow disableCache(boolean disableCache)
disableCache - - disables cache when set to true.public JwtBearerTokenFlow setOpaqueTokenFormat(boolean opaque)
opaque - enables opaque token format when set to true.public OAuth2TokenResponse execute() throws TokenFlowException
IllegalStateException - - in case not all mandatory fields of the token flow request have
been set.TokenFlowException - - in case of an error during the flow, or when the token cannot
be obtained.Copyright © 2023. All rights reserved.