public class PasswordTokenFlow extends Object
| Constructor and Description |
|---|
PasswordTokenFlow(OAuth2TokenService tokenService,
OAuth2ServiceEndpointsProvider endpointsProvider,
ClientIdentity clientIdentity) |
| Modifier and Type | Method and Description |
|---|---|
PasswordTokenFlow |
disableCache(boolean disableCache)
Can be used to disable the cache for the flow.
|
OAuth2TokenResponse |
execute()
Executes this flow against the XSUAA endpoint.
|
PasswordTokenFlow |
optionalParameters(Map<String,String> optionalParameters)
Adds additional authorization attributes to the request.
|
PasswordTokenFlow |
password(String password)
The password for the user trying to get a token.
|
PasswordTokenFlow |
subdomain(String subdomain)
Set the Subdomain the token is requested for.
|
PasswordTokenFlow |
username(String username)
The username for the user trying to get a token.
|
public PasswordTokenFlow(@Nonnull OAuth2TokenService tokenService, @Nonnull OAuth2ServiceEndpointsProvider endpointsProvider, @Nonnull ClientIdentity clientIdentity)
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.public PasswordTokenFlow password(String password)
password - - the password.public PasswordTokenFlow username(String username)
username - - the username.public PasswordTokenFlow subdomain(String subdomain)
subdomain - - the subdomain.public PasswordTokenFlow optionalParameters(Map<String,String> optionalParameters)
optionalParameters - - the optional parameters.public PasswordTokenFlow disableCache(boolean disableCache)
disableCache - - disables cache when set to true.Copyright © 2022. All rights reserved.