org.weborganic.bastille.security.ps
Class PageSeederAuthenticator

java.lang.Object
  extended by org.weborganic.bastille.security.ps.PageSeederAuthenticator
All Implemented Interfaces:
Authenticator

public final class PageSeederAuthenticator
extends Object
implements Authenticator

An authenticator that uses PageSeeder to authenticate users.

Since:
0.6.2

Constructor Summary
PageSeederAuthenticator()
           
 
Method Summary
 AuthenticationResult login(javax.servlet.http.HttpServletRequest req)
          The PageSeeder login requires a username and password and checks them against the members on a PageSeeder Server.
static PageSeederUser login(String username, String password)
          Logins the user using their username and password.
 AuthenticationResult logout(javax.servlet.http.HttpServletRequest req)
          Logs the specified user out.
 boolean logout(User user)
          Logs the specified user out.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageSeederAuthenticator

public PageSeederAuthenticator()
Method Detail

login

public AuthenticationResult login(javax.servlet.http.HttpServletRequest req)
                           throws IOException
The PageSeeder login requires a username and password and checks them against the members on a PageSeeder Server. 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.

Specified by:
login in interface Authenticator
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

public AuthenticationResult logout(javax.servlet.http.HttpServletRequest req)
                            throws IOException
Description copied from interface: Authenticator
Logs the specified user out.

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

login

public static PageSeederUser login(String username,
                                   String password)
                            throws IOException
Logins the user using their username and password.

Parameters:
username - The username of the user to login
password - The password of the user to login
Returns:
The corresponding user or null
Throws:
IOException - Should any I/O error occurs while connecting to the server.

logout

public boolean logout(User user)
               throws IOException
Description copied from interface: Authenticator
Logs the specified user out.

Specified by:
logout in interface Authenticator
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.