com.caucho.server.http
Class AbstractAuthenticator

java.lang.Object
  |
  +--com.caucho.server.http.AbstractAuthenticator
All Implemented Interfaces:
Authenticator
Direct Known Subclasses:
NullAuthenticator

public abstract class AbstractAuthenticator
extends java.lang.Object
implements Authenticator

This class is provided only for backwards compatibility. Use com.caucho.http.security.AbstractAuthenticator instead.


Field Summary
protected  ServletContext application
          Deprecated.  
protected  java.lang.String cookieDomain
          Deprecated.  
protected  long cookieMaxAge
          Deprecated.  
static java.lang.String LOGIN_NAME
          Deprecated.  
protected  RegistryNode params
          Deprecated.  
protected  LruCache principalCache
          Deprecated.  
protected  int principalCacheSize
          Deprecated.  
protected  boolean useCookie
          Deprecated.  
 
Constructor Summary
AbstractAuthenticator()
          Deprecated.  
 
Method Summary
 java.security.Principal authenticate(HttpServletRequest request)
          Deprecated. Grab the user from the request, assuming the user has already logged in.
 java.security.Principal authenticate(HttpServletRequest request, java.lang.String user, java.lang.String password)
          Deprecated. Authenticate (login) the user.
 java.security.Principal authenticate(java.lang.String user, java.lang.String password)
          Deprecated.  
 java.security.Principal authenticateCookie(HttpServletRequest request, java.lang.String cookieValue)
          Deprecated.  
 java.security.Principal authenticateCookie(java.lang.String cookieValue)
          Deprecated.  
 java.lang.String getCookieDomain()
          Deprecated. Returns the domain for a login cookie.
 long getCookieMaxAge()
          Deprecated. Returns the max-age for a login cookie.
 int getPrincipalCacheSize()
          Deprecated. Returns the size of the principal cache.
 ServletContext getServletContext()
          Deprecated. Returns the servlet context owning this authenticator.
 boolean getUseCookie()
          Deprecated. Returns true if Resin should generate the resinauth cookie by default.
 void init()
          Deprecated. Initialize the authenticator with the application.
 void init(CauchoApplication app, RegistryNode params)
          Deprecated. Initialize the authenticator with the application.
 boolean isUserInRole(HttpServletRequest request, java.security.Principal user, java.lang.String role)
          Deprecated. Returns true if the user plays the named role.
 boolean isUserInRole(java.security.Principal user, java.lang.String role)
          Deprecated.  
 java.security.Principal login(HttpServletRequest request, HttpServletResponse response, ServletContext application, java.lang.String user, java.lang.String password, boolean allowCookie)
          Deprecated. Logs the user in with any appropriate password.
 java.security.Principal login(HttpServletRequest request, HttpServletResponse response, ServletContext application, java.lang.String user, java.lang.String password, java.lang.String allowCookie)
          Deprecated. Logs the user in with any appropriate password.
 void logout(HttpServletRequest request)
          Deprecated. Logs the user out from the session.
 void setCookieDomain(java.lang.String cookieDomain)
          Deprecated. Sets the domain for a login cookie.
 void setCookieMaxAge(long cookieMaxAge)
          Deprecated. Sets the max age for a login cookie.
 void setPrincipalCacheSize(int size)
          Deprecated. Sets the size of the principal cache.
 void setUseCookie(boolean useCookie)
          Deprecated. Set true if Resin should generate the resinauth cookie by default.
 boolean updateCookie(HttpServletRequest request, java.security.Principal user, java.lang.String cookieValue)
          Deprecated.  
 boolean updateCookie(java.security.Principal user, java.lang.String cookieValue)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGIN_NAME

public static final java.lang.String LOGIN_NAME
Deprecated. 

application

protected ServletContext application
Deprecated. 

params

protected RegistryNode params
Deprecated. 

principalCacheSize

protected int principalCacheSize
Deprecated. 

principalCache

protected LruCache principalCache
Deprecated. 

useCookie

protected boolean useCookie
Deprecated. 

cookieDomain

protected java.lang.String cookieDomain
Deprecated. 

cookieMaxAge

protected long cookieMaxAge
Deprecated. 
Constructor Detail

AbstractAuthenticator

public AbstractAuthenticator()
Deprecated. 
Method Detail

getPrincipalCacheSize

public int getPrincipalCacheSize()
Deprecated. 
Returns the size of the principal cache.

setPrincipalCacheSize

public void setPrincipalCacheSize(int size)
Deprecated. 
Sets the size of the principal cache.

getUseCookie

public boolean getUseCookie()
Deprecated. 
Returns true if Resin should generate the resinauth cookie by default.

setUseCookie

public void setUseCookie(boolean useCookie)
Deprecated. 
Set true if Resin should generate the resinauth cookie by default.

getCookieDomain

public java.lang.String getCookieDomain()
Deprecated. 
Returns the domain for a login cookie.

setCookieDomain

public void setCookieDomain(java.lang.String cookieDomain)
Deprecated. 
Sets the domain for a login cookie.

getCookieMaxAge

public long getCookieMaxAge()
Deprecated. 
Returns the max-age for a login cookie.

setCookieMaxAge

public void setCookieMaxAge(long cookieMaxAge)
Deprecated. 
Sets the max age for a login cookie.

init

public void init(CauchoApplication app,
                 RegistryNode params)
          throws ServletException
Deprecated. 
Initialize the authenticator with the application. After calling init(), the setXXX bean methods will be called for any init-param.
Specified by:
init in interface Authenticator
Parameters:
application - the owning application.

init

public void init()
          throws ServletException
Deprecated. 
Initialize the authenticator with the application.

getServletContext

public ServletContext getServletContext()
Deprecated. 
Returns the servlet context owning this authenticator.

authenticate

public java.security.Principal authenticate(HttpServletRequest request)
                                     throws ServletException
Deprecated. 
Grab the user from the request, assuming the user has already logged in. In other words, overriding methods could use cookies or the session to find the logged in principal, but shouldn't try to log the user in with form parameters.
Specified by:
authenticate in interface Authenticator
Parameters:
request - the servlet request.
Returns:
a Principal representing the user or null if none has logged in.

login

public java.security.Principal login(HttpServletRequest request,
                                     HttpServletResponse response,
                                     ServletContext application,
                                     java.lang.String user,
                                     java.lang.String password,
                                     java.lang.String allowCookie)
Deprecated. 
Logs the user in with any appropriate password.
Specified by:
login in interface Authenticator
Following copied from interface: com.caucho.server.http.Authenticator
Parameters:
request - servlet request
response - servlet response, in case any cookie need sending.
application - servlet application
user - the user name.
password - the user's presented password.
allowCookie - true if the user allows cookies for subsequent requests.
Returns:
the logged in principal on success, null on failure.

login

public java.security.Principal login(HttpServletRequest request,
                                     HttpServletResponse response,
                                     ServletContext application,
                                     java.lang.String user,
                                     java.lang.String password,
                                     boolean allowCookie)
Deprecated. 
Logs the user in with any appropriate password.

isUserInRole

public boolean isUserInRole(HttpServletRequest request,
                            java.security.Principal user,
                            java.lang.String role)
Deprecated. 
Returns true if the user plays the named role.
Specified by:
isUserInRole in interface Authenticator
Parameters:
request - the servlet request
user - the user to test
role - the role to test

logout

public void logout(HttpServletRequest request)
Deprecated. 
Logs the user out from the session.
Specified by:
logout in interface Authenticator
Parameters:
request - the servlet request

authenticate

public java.security.Principal authenticate(HttpServletRequest request,
                                            java.lang.String user,
                                            java.lang.String password)
Deprecated. 
Authenticate (login) the user.

authenticateCookie

public java.security.Principal authenticateCookie(HttpServletRequest request,
                                                  java.lang.String cookieValue)
Deprecated. 

updateCookie

public boolean updateCookie(HttpServletRequest request,
                            java.security.Principal user,
                            java.lang.String cookieValue)
Deprecated. 

authenticate

public java.security.Principal authenticate(java.lang.String user,
                                            java.lang.String password)
Deprecated. 

authenticateCookie

public java.security.Principal authenticateCookie(java.lang.String cookieValue)
Deprecated. 

updateCookie

public boolean updateCookie(java.security.Principal user,
                            java.lang.String cookieValue)
Deprecated. 

isUserInRole

public boolean isUserInRole(java.security.Principal user,
                            java.lang.String role)
Deprecated.