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 TypeMethodDescriptionlong
verifyCredentials
(Credentials credentials) Verifies the validity of the providedCredentials
instance.
-
Method Details
-
verifyCredentials
Verifies the validity of the providedCredentials
instance.- Parameters:
credentials
- TheCredentials
instance that needs to be verified.- Returns:
- A
long
that uniquely identifies the user that corresponds to the validated credentials; or-1
if 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
-