public class XsuaaTokenFlows extends Object implements Serializable
@Autowired by applications to get access to token
flow builders. The token flow builders allow for the execution of a client
credentials flow (to get a technical user token) and a user token flow (to
get an exchange token with different scopes). | Constructor and Description |
|---|
XsuaaTokenFlows(OAuth2TokenService oAuth2TokenService,
OAuth2ServiceEndpointsProvider endpointsProvider,
ClientCredentials clientCredentials)
Deprecated.
|
XsuaaTokenFlows(OAuth2TokenService oAuth2TokenService,
OAuth2ServiceEndpointsProvider endpointsProvider,
ClientIdentity clientIdentity)
Create a new instance of this bean with the given RestTemplate.
|
| Modifier and Type | Method and Description |
|---|---|
ClientCredentialsTokenFlow |
clientCredentialsTokenFlow()
Creates a new Client Credentials Flow builder object.
|
JwtBearerTokenFlow |
jwtBearerTokenFlow()
Creates a new JWT Bearer Token Flow builder object.
Token, authorize and key set endpoints will be derived relative to the base URI. |
PasswordTokenFlow |
passwordTokenFlow()
Creates a new Refresh Token Flow builder object.
Token, authorize and key set endpoints will be derived relative to the base URI. |
RefreshTokenFlow |
refreshTokenFlow()
Creates a new Refresh Token Flow builder object.
Token, authorize and key set endpoints will be derived relative to the base URI. |
UserTokenFlow |
userTokenFlow()
Deprecated.
Please use
jwtBearerTokenFlow() instead |
@Deprecated public XsuaaTokenFlows(OAuth2TokenService oAuth2TokenService, OAuth2ServiceEndpointsProvider endpointsProvider, ClientCredentials clientCredentials)
XsuaaTokenFlows(OAuth2TokenService, OAuth2ServiceEndpointsProvider, ClientIdentity)public XsuaaTokenFlows(OAuth2TokenService oAuth2TokenService, OAuth2ServiceEndpointsProvider endpointsProvider, ClientIdentity clientIdentity)
@Autowire instances of this bean.oAuth2TokenService - the OAuth2TokenService that will be used to send the token
exchange request.endpointsProvider - the endpoint provider that serves the token endpoint.clientIdentity - the OAuth2.0 client identity
String clientId = "<<get your client id from your service binding>>";
String clientSecret = "<<get your client secret from your service binding>>";
String xsuaaBaseUrl = "<<get your xsuaa base url from service binding>>";
XsuaaTokenFlows tokenFlows = new XsuaaTokenFlows(
new DefaultOAuth2TokenService(),
new XsuaaDefaultEndpoints(xsuaaBaseUrl),
new ClientCredentials(clientId, clientSecret));
@Deprecated public UserTokenFlow userTokenFlow()
jwtBearerTokenFlow() insteadUserTokenFlow builder object.public JwtBearerTokenFlow jwtBearerTokenFlow()
JwtBearerTokenFlow builder object.public ClientCredentialsTokenFlow clientCredentialsTokenFlow()
ClientCredentialsTokenFlow builder object.public RefreshTokenFlow refreshTokenFlow()
RefreshTokenFlow builder object.public PasswordTokenFlow passwordTokenFlow()
PasswordTokenFlow builder object.Copyright © 2023. All rights reserved.