org.mycore.user.authentication
Interface MCRAuthenticator

All Known Implementing Classes:
MCRMailAuthenticator

public interface MCRAuthenticator

Authenticates a userID by checking a given password for that userID.

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Frank Lützenkirchen

Method Summary
 boolean authenticate(String username, String password)
          Authenticates a user by checking a given password for that user.
 void init(String ID)
          Initializes this instance.
 

Method Detail

init

void init(String ID)
Initializes this instance. Each MCRAuthenticator instance must have a unique ID that determines the class and the configuration properties of that instance. All configuration properties of this instance have the common prefix MCR.UserAuthenticator.[ID].*

Parameters:
ID - the unique ID of this MCRAuthenticator instance

authenticate

boolean authenticate(String username,
                     String password)
Authenticates a user by checking a given password for that user. The mechanism used for checking this depends on the implementation that is used, for example LDAP, IMAP, SLNP, JAAS, ...

Parameters:
username - the username
password - the password
Returns:
true, if the password is correct, false otherwise