| Constructor and Description |
|---|
AuthTokenFacade() |
| Modifier and Type | Method and Description |
|---|---|
Optional<AuthToken> |
getCurrentToken()
Returns the current
AuthToken, if present. |
AuthToken |
getXsuaaServiceToken()
Retrieves a validated authentication token from the bound XSUAA instance.
|
@Nonnull public 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 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.