Interface TokenAuthenticationResult


  • public interface TokenAuthenticationResult
    Class that represents the result of the authentication check performed by a TokenAuthenticator.
    • 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.