Constructor and Description |
---|
AuthTokenAccessor() |
Modifier and Type | Method and Description |
---|---|
static AuthTokenFacade |
getAuthTokenFacade() |
static Optional<AuthToken> |
getCurrentToken()
Returns the current
AuthToken , if present. |
static void |
setAuthTokenFacade(AuthTokenFacade authTokenFacade)
Replaces the default
AuthTokenFacade 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.@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
.Copyright © 2018 SAP SE. All rights reserved.