Package com.sap.cloud.security.servlet
Interface TokenAuthenticationResult
public interface TokenAuthenticationResult
Class that represents the result of the authentication check performed by a
TokenAuthenticator
.-
Method Summary
Modifier and TypeMethodDescriptionThe principal associated with the request.default Collection<String>
The authentication scopes.getToken()
The token that was checked for authentication.default String
If not authenticated, this returns the reason why as text.default boolean
-
Method Details
-
getToken
The token that was checked for authentication.- Returns:
- the token.
-
getPrincipal
The principal associated with the request.- Returns:
- the principal.
-
getScopes
The authentication scopes. Can be empty.- Returns:
- the scopes as a list of strings. Returns empty collection by default.
-
isAuthenticated
default boolean isAuthenticated()- Returns:
- false if a reason for "unauthenticated" is given.
-
getUnauthenticatedReason
If not authenticated, this returns the reason why as text.- Returns:
- the textual description why the request was not authenticated. Empty string if authenticated.
-