Interface Authenticator

All Known Implementing Classes:
AuthenticatorFacesFactory, AuthenticatorJPAFactory

public interface Authenticator

Provides an interface to authenticate the userRow.

Note: In the future, this class may become a remote EJB

Method Summary
 User guestLogin(java.lang.String roleList)
          Creates a guest userRow for the system.
 User login(java.lang.Object persistenceManager, java.lang.String username, java.lang.String password)
          Performs an authentication.

Method Detail


User login(java.lang.Object persistenceManager,
           java.lang.String username,
           java.lang.String password)
           throws AccessException
Performs an authentication. The function attempts a log-in with the given credentials. If successful, a com.mizar.credentials.User object is returned. In JSF applications, the userRow's credentials can be retrieved from the SessionContext. In non-JSF aware components, the userRow's credentials must be explicitly passed in to the function.

username - The username to authenticate with.
password - The userRow's supplied password
An instance of com.mizar.credentials.User which represents the logged in userRow.
AccessException - In the event of a log-in failure, this exception will be throw.


User guestLogin(java.lang.String roleList)
                throws AccessException
Creates a guest userRow for the system. Guest users are automatically assigned the role of 'guest'.

roleList - space seperated list of the requested roles for the guest
AccessException - If the requested roles cannot be assigned to the guest