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.
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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault CREDENTIALS
Returns anObject
with credentials that prove the principal is correct and is who they say they are.Returns anObject
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 aAuthentication
andAuthentication
. However, even if authentication was requested, it does not necessarily mean theAuthentication
successfully authenticated.- Returns:
- a boolean valuing indicating whether authentication was actually requested.
- See Also:
-
getPrincipal
PRINCIPAL getPrincipal()Returns anObject
identifying the principal being authenticated.- Returns:
- an
Object
identifying the principal being authenticated.
-
getCredentials
Returns anObject
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.
-