| Constructor and Description |
|---|
AuthTokenAccessor() |
| Modifier and Type | Method and Description |
|---|---|
static AuthTokenFacade |
getAuthTokenFacade() |
static Optional<AuthToken> |
getCurrentToken()
Returns the current
AuthToken, if present. |
static Future<String> |
getRefreshToken(com.auth0.jwt.interfaces.DecodedJWT jwt)
Returns a future that resolves to a refresh token.
|
static AuthToken |
getXsuaaServiceToken()
Retrieves a validated authentication token from the bound XSUAA instance.
|
static void |
setAuthTokenFacade(AuthTokenFacade authTokenFacade)
Replaces the default
AuthTokenFacade instance. |
static void |
setRefreshTokenFacade(RefreshTokenFacade refreshTokenFacade)
Replaces the default
RefreshTokenFacade instance. |
@Nonnull public static AuthTokenFacade getAuthTokenFacade()
AuthTokenFacade instance. This method is for internal use only.public static void setAuthTokenFacade(@Nonnull AuthTokenFacade authTokenFacade)
AuthTokenFacade instance. This method is for internal use only.authTokenFacade - An instance of AuthTokenFacade.public static void setRefreshTokenFacade(@Nonnull RefreshTokenFacade refreshTokenFacade)
RefreshTokenFacade instance. This method is for internal use only.refreshTokenFacade - An instance of RefreshTokenFacade.@Nonnull public static Optional<AuthToken> getCurrentToken() throws AuthTokenAccessException
AuthToken, if present. An AuthToken is not present if no request is available
or the request does not contain an "Authorization" header.Optional of the current AuthToken.AuthTokenAccessException - If there is an issue while trying to access the AuthToken.@Nonnull public static AuthToken getXsuaaServiceToken() throws TokenRequestFailedException
TokenRequestFailedException - If no XSUAA instance was bound or the communication with the service failed.Copyright © 2019 SAP SE. All rights reserved.