Interface Authenticator

All Known Subinterfaces:
UserManager
All Known Implementing Classes:
FakeUserManagerImpl, MultiTenantUserManager, UserManagerImpl, UserManagerWithComputedGroups

public interface Authenticator
Authenticate the given username against the given password.

This service should be exposed by a user manager framework implementation.

Author:
Bogdan Stefanescu
  • Method Summary

    Modifier and Type
    Method
    Description
    authenticate(String name, String password)
    Get a principal object for the given username if the username / password pair is valid, otherwise returns null.
    boolean
    Check the password for the given username.
  • Method Details

    • authenticate

      Principal authenticate(String name, String password)
      Get a principal object for the given username if the username / password pair is valid, otherwise returns null.

      This method is doing the authentication of the given username / password pair and returns the corresponding principal object if authentication succeeded otherwise returns null.

      Returns:
      the authenticated principal if authentication succeded otherwise null
    • checkUsernamePassword

      boolean checkUsernamePassword(String name, String password)
      Check the password for the given username. Returns true if the username / password pair match, false otherwise.
      Parameters:
      name - the username
      password - the password to check
      Returns:
      true is valid, false otherwise