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 Type
    Method
    Description
    long
    Verifies the validity of the provided Credentials instance.
  • Method Details

    • verifyCredentials

      long verifyCredentials(Credentials credentials) throws CredentialsManagerException
      Verifies the validity of the provided Credentials instance.
      Parameters:
      credentials - The Credentials 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 of CredentialsManagerException. It's up to the implementations of this interface to give more specific meanings to these exceptions.
      Since:
      1.0