org.jwall.web.audit.util
Interface Authenticator

All Known Implementing Classes:
PasswordFileAuthenticator, SimplePasswordAuthenticator

public interface Authenticator

This interface defines a simple authentication and group-authorization module. It provides methods to authenticate a user using a simple login and password string. It also allows for checking group-membership of a given username.

Author:
Christian Bockermann <chris@jwall.org>

Method Summary
 boolean authenticate(String login, String password)
          This method is used to authenticate the given user (login) with the specified password.
 List<String> getRoles(String login)
          This method returns the list of groups which the user sepcified by login belongs to.
 boolean isUserInRole(String user, String role)
          This method returns if the given user (user) is a member of the specified group (role).
 

Method Detail

authenticate

boolean authenticate(String login,
                     String password)
This method is used to authenticate the given user (login) with the specified password.

Parameters:
login - The login of the user to authenticate.
password - The password used for authentication.
Returns:
true, if the user exists and the password equals the one stored within the authenticator.

isUserInRole

boolean isUserInRole(String user,
                     String role)
This method returns if the given user (user) is a member of the specified group (role).

Parameters:
user - The user to check.
role - The group to check.
Returns:
true, if the users is a member of the given group.

getRoles

List<String> getRoles(String login)
This method returns the list of groups which the user sepcified by login belongs to.

Parameters:
login - The user's login.
Returns:
The list of group names, which the user is a member of.


Copyright © 2012 jwall.org. All Rights Reserved.