PRINCIPAL
- type
modeling the principal object.CREDENTIALS
- type
modeling the credentials object.@FunctionalInterface public interface Authentication<PRINCIPAL,CREDENTIALS>
FunctionalInterface
defining a contract to model the details of
a security authentication request.
This ADT is loosely modeled after Spring Security's Authentication
interface.FunctionalInterface
Modifier and Type | Method and Description |
---|---|
default CREDENTIALS |
getCredentials()
Returns an
Object with credentials that prove the principal is correct
and is who they say they are. |
PRINCIPAL |
getPrincipal()
Returns an
Object identifying the principal being authenticated. |
default boolean |
isAuthenticated()
Determines whether the principal has been successfully authenticated.
|
default boolean |
isRequested()
Determines whether authentication was actually requested.
|
default boolean isAuthenticated()
default boolean isRequested()
PRINCIPAL
and CREDENTIALS
. However, even if authentication
was requested, it does not necessarily mean the PRINCIPAL
successfully authenticated.getCredentials()
,
getPrincipal()
PRINCIPAL getPrincipal()
Object
identifying the principal being authenticated.Object
identifying the principal being authenticated.default CREDENTIALS getCredentials()
Object
with credentials that prove the principal is correct
and is who they say they are.Object
with credentials that prove the principal is correct.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.