Interface Authentication<PRINCIPAL,CREDENTIALS>

Type Parameters:
PRINCIPAL - type modeling the principal object.
CREDENTIALS - type modeling the credentials object.
All Known Implementing Classes:
AuthenticationBeanConfiguration.SpringDataGeodeAuthentication
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Authentication<PRINCIPAL,CREDENTIALS>
Abstract Data Type (ADT) and FunctionalInterface defining a contract to model the details of a security authentication request. This ADT is loosely modeled after Spring Security's Authentication interface.
Since:
3.0.0
Author:
John Blum
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default CREDENTIALS
    Returns an Object with credentials that prove the principal is correct and is who they say they are.
    Returns an Object identifying the principal being authenticated.
    default boolean
    Determines whether the principal has been successfully authenticated.
    default boolean
    Determines whether authentication was actually requested.
  • Method Details

    • isAuthenticated

      default boolean isAuthenticated()
      Determines whether the principal has been successfully authenticated.
      Returns:
      a boolean value indicating whether the principal has been successfully authenticated.
    • isRequested

      default boolean isRequested()
      Determines whether authentication was actually requested. The default implementation determines whether authentication was requested by the presence a Authentication and Authentication. However, even if authentication was requested, it does not necessarily mean the Authentication successfully authenticated.
      Returns:
      a boolean valuing indicating whether authentication was actually requested.
      See Also:
    • getPrincipal

      PRINCIPAL getPrincipal()
      Returns an Object identifying the principal being authenticated.
      Returns:
      an Object identifying the principal being authenticated.
    • getCredentials

      default CREDENTIALS getCredentials()
      Returns an Object with credentials that prove the principal is correct and is who they say they are.
      Returns:
      Returns an Object with credentials that prove the principal is correct.