net.larsan.norna.service.user
Interface Authenticator


public interface Authenticator

The authenticator is a simple interface for authenticating a user.

Version:
Alpha-0.2 / 2002-10-06 21:37
Author:
Lars J. Nilsson
See Also:
UserHandle

Method Summary
 LoginSession authenticate(char[] cred)
          Authenticate a user using credentials.
 LoginSession authenticate(char[] cred, LoginListener[] listeners)
          Authenticate a user and notify listeners.
 Indirection getIndirection()
          Get backing indirection if available.
 

Method Detail

authenticate

public LoginSession authenticate(char[] cred)
                          throws AuthenticationFailedException
Authenticate a user using credentials. This method does not fire any login events to the login listeners.

Parameters:
cred - User credentials
Returns:
A user subject
Throws:
AuthenticationFailedException - If authentication failed

authenticate

public LoginSession authenticate(char[] cred,
                                 LoginListener[] listeners)
                          throws AuthenticationFailedException
Authenticate a user and notify listeners. If the listener parameter is null all available listeners will be notified.

Parameters:
cred - User credentials
listeners - Listeners to notify, null to notify all
Returns:
A user subject or null if authenication failed
Throws:
AuthenticationFailedException - If authentication failed

getIndirection

public Indirection getIndirection()
Get backing indirection if available. The indirection is used to transform the credentials used by the authentication.

Returns:
An indirection if available, or null if not used