org.restafarian.core.security
Class AuthenticatedUserManager

java.lang.Object
  extended by org.restafarian.core.security.AuthenticatedUserManager

public class AuthenticatedUserManager
extends java.lang.Object

This module finds and returns the currently authenticated user.


Constructor Summary
AuthenticatedUserManager()
           
 
Method Summary
static Person getAuthenticatedUser(javax.servlet.http.HttpServletRequest req)
          Returns the currently authenticated user, or null, if there is no user currently authenticated.
static void init(javax.servlet.ServletContext context, org.apache.commons.configuration.Configuration config)
          Initializes the module using the configuration.
 void setAuthenticatedUser(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, Person user)
          Sets the currently authenticated user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatedUserManager

public AuthenticatedUserManager()
Method Detail

init

public static void init(javax.servlet.ServletContext context,
                        org.apache.commons.configuration.Configuration config)

Initializes the module using the configuration.

Parameters:
context - the ServletContext object
config - the Configuration object

getAuthenticatedUser

public static Person getAuthenticatedUser(javax.servlet.http.HttpServletRequest req)

Returns the currently authenticated user, or null, if there is no user currently authenticated.

Parameters:
req - the HttpServletRequest object
Returns:
user the currently authenticated user

setAuthenticatedUser

public void setAuthenticatedUser(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res,
                                 Person user)

Sets the currently authenticated user.

Parameters:
req - the HttpServletRequest object
res - the HttpServletResponse object
user - the currently authenticated user


Copyright © 2008. All Rights Reserved.