org.weborganic.bastille.security
Interface Authenticator

All Known Implementing Classes:
PageSeederAuthenticator

public interface Authenticator

Must provide the login and logout mechanisms.

Since:
0.6.2

Method Summary
 AuthenticationResult login(javax.servlet.http.HttpServletRequest req)
          Logs the specified user in.
 AuthenticationResult logout(javax.servlet.http.HttpServletRequest req)
          Logs the specified user out.
 boolean logout(User user)
          Logs the specified user out.
 

Method Detail

login

AuthenticationResult login(javax.servlet.http.HttpServletRequest req)
                           throws IOException
Logs the specified user in.

The servlet request must contain the details sufficient to login (eg. parameters, headers).

Implementations should specify which details are required to login.

Parameters:
req - the HTTP Servlet Request that contains the details sufficient to login.
Returns:
The result of this authentication process.
Throws:
IOException - if any error occurs while trying to login.

logout

AuthenticationResult logout(javax.servlet.http.HttpServletRequest req)
                            throws IOException
Logs the specified user out.

Parameters:
req - The HTTP srevlet request.
Returns:
The result of this authentication process..
Throws:
IOException - Should an error occur while logging out.

logout

boolean logout(User user)
               throws IOException
Logs the specified user out.

Parameters:
user - Logout the specified user.
Returns:
true if the logout request succeeded, false otherwise.
Throws:
IOException - Should an error occur while logging the user out.