public interface Authentication
Authentication interface defines methods to validate
Credentials during the
login step of the
authentication process. The validation depends on the authentication
mechanism in place.
A given implementation may only handle certain types of Credentials
as the authentication process is tightly coupled to the semantics of the
Credentials.
For example a implementation may only be able to validate UserID/password
pairs such as passed with javax.jcr.SimpleCredentials, while another
might be responsible for validating login token issued by the repository or
an external access token generation mechanism.
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticate(Credentials credentials)
Validates the specified
Credentials and returns true if
the validation was successful. |
java.lang.String |
getUserId()
Optional method that return the userID extracted upon
authenticate(Credentials). |
java.security.Principal |
getUserPrincipal()
Optional method that return the
Principal of the authenticating user
extracted upon authenticate(Credentials). |
boolean authenticate(Credentials credentials)
throws javax.security.auth.login.LoginException
Credentials and returns true if
the validation was successful.credentials - to verifytrue if the validation was successful; false
if the specified credentials are not supported and this authentication
implementation cannot verify their validity.javax.security.auth.login.LoginException - if the authentication failed.java.lang.String getUserId()
authenticate(Credentials).
It is expected to return null if the implementation doesn't support this.
An IllegalStateException may be thrown if called prior to authenticate(Credentials).nulljava.security.Principal getUserPrincipal()
Principal of the authenticating user
extracted upon authenticate(Credentials). It is expected to return
null if the implementation doesn't support this.
An IllegalStateException may be thrown if called prior to authenticate(Credentials).Principal or null"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"