Class ScpCfAuthTokenFacade
java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.ScpCfAuthTokenFacade
- All Implemented Interfaces:
AuthTokenFacade
Facade for retrieving the current
AuthToken.-
Field Summary
Fields inherited from interface com.sap.cloud.sdk.cloudplatform.security.AuthTokenFacade
NULL -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ScpCfAuthTokenFacade(com.sap.cloud.security.xsuaa.client.OAuth2TokenService tokenService, com.sap.cloud.security.config.OAuth2ServiceConfiguration oauth2Configuration) Deprecated.Token validation will be removed with the next major release. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> TexecuteWithAuthToken(AuthToken authToken, Callable<T> callable) getRefreshToken(com.auth0.jwt.interfaces.DecodedJWT jwt) Deprecated.Please leverage the security library directly instead.io.vavr.control.Try<AuthToken>io.vavr.control.Try<AuthToken>Deprecated.Please leverage the XSUAA Security Library directly instead.
-
Constructor Details
-
ScpCfAuthTokenFacade
public ScpCfAuthTokenFacade()Default constructor. -
ScpCfAuthTokenFacade
@Deprecated public ScpCfAuthTokenFacade(@Nonnull com.sap.cloud.security.xsuaa.client.OAuth2TokenService tokenService, @Nullable com.sap.cloud.security.config.OAuth2ServiceConfiguration oauth2Configuration) Deprecated.Token validation will be removed with the next major release. Please leverage the security library directly instead.Create a newScpCfAuthTokenFacadewith the given token service and anOAuth2ServiceConfiguration. The latter will be used to construct a validator for auth token validation.- Parameters:
tokenService- TheOAuth2TokenServiceto be used.oauth2Configuration- The OAuth2 configuration to be used.
-
-
Method Details
-
tryGetCurrentToken
-
tryGetXsuaaServiceToken
Deprecated.Please leverage the XSUAA Security Library directly instead.Attempts to retrieve an auth token for the provider account for a technical user. This method is not compatible with version 3.0.0 or higher of the XSUAA Security Library- Returns:
- An auth token or a failure.
-
getRefreshToken
@Nonnull @Deprecated public Future<String> getRefreshToken(@Nonnull com.auth0.jwt.interfaces.DecodedJWT jwt) Deprecated.Please leverage the security library directly instead.Asynchronously resolve a new refresh token on behalf of a given JWT.- Parameters:
jwt- The JWT.- Returns:
- A new refresh token.
-
executeWithAuthToken
@Nullable protected <T> T executeWithAuthToken(@Nonnull AuthToken authToken, @Nonnull Callable<T> callable) throws ThreadContextExecutionException - Throws:
ThreadContextExecutionException
-