Package com.sap.cloud.security.servlet
Interface TokenAuthenticationResult
-
public interface TokenAuthenticationResultClass that represents the result of the authentication check performed by aTokenAuthenticator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PrincipalgetPrincipal()The principal associated with the request.default Collection<String>getScopes()The authentication scopes.TokengetToken()The token that was checked for authentication.default StringgetUnauthenticatedReason()If not authenticated, this returns the reason why as text.default booleanisAuthenticated()
-
-
-
Method Detail
-
getToken
@Nullable Token getToken()
The token that was checked for authentication.- Returns:
- the token.
-
getPrincipal
@Nullable Principal getPrincipal()
The principal associated with the request.- Returns:
- the principal.
-
getScopes
default Collection<String> 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
default String 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.
-
-