Package rife.authentication
Interface CredentialsManager
- All Known Implementing Classes:
DatabaseUsers,MemoryUsers
public interface CredentialsManager
This interface defines the methods that classes with
CredentialsManager functionalities have to implement.
A CredentialsManager is in charge of verifying
Credentials instances. Using the information that a
CredentialsManager provides, the authentication system is able
to take appropriate actions (i.e. start a new session, provide informational
messages about a user's status, and so on).
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlongverifyCredentials(Credentials credentials) Verifies the validity of the providedCredentialsinstance.
-
Method Details
-
verifyCredentials
Verifies the validity of the providedCredentialsinstance.- Parameters:
credentials- TheCredentialsinstance that needs to be verified.- Returns:
- A
longthat uniquely identifies the user that corresponds to the validated credentials; or-1if the credentials are invalid. - Throws:
CredentialsManagerException- An undefined number of exceptional cases or error situations can occur when credentials are verified. They are all indicated by throwing an instance ofCredentialsManagerException. It's up to the implementations of this interface to give more specific meanings to these exceptions.- Since:
- 1.0
-