com.opensymphony.user.adapter.resin
Class ResinAuthenticatorAdapter

java.lang.Object
  extended bycom.caucho.http.security.AbstractAuthenticator
      extended bycom.opensymphony.user.adapter.resin.ResinAuthenticatorAdapter
All Implemented Interfaces:
com.caucho.http.security.ServletAuthenticator

public class ResinAuthenticatorAdapter
extends com.caucho.http.security.AbstractAuthenticator

A ResinAuthenticatorAdapter for OSUser. It _should_ work but hasn't really been tested as none of the core developers use Resin. Please email me (or the OSUser list) if you use this Adapter - and tell me whether it works properly or not ;) See Security Configuration document at Caucho site for more information on Resin Authenticators.

Author:
Mike Cannon-Brookes

Field Summary
 
Fields inherited from class com.caucho.http.security.AbstractAuthenticator
LOGIN_NAME, passwordDigest, passwordDigestName, principalCache, principalCacheSize
 
Constructor Summary
ResinAuthenticatorAdapter()
           
 
Method Summary
protected  java.security.Principal getUserPrincipalImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
          Not sure how this should work in an OSUser sense.
 void init()
          Initializes this Authenticator.
 boolean isUserInRole(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext context, java.security.Principal principal, java.lang.String s)
          This doesn't seem to make much sense in a deployment environment, as the roles should be set in web.xml? (Or perhaps I haven't had enough sleep today)
protected  java.security.Principal loginImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext context, java.lang.String s, java.lang.String s1)
          Delegates to lookup based on username and password
protected  java.security.Principal loginImpl(java.lang.String username, java.lang.String password)
          Look up a user given a username, authenticate their password and return the user if they authenticate.
 
Methods inherited from class com.caucho.http.security.AbstractAuthenticator
digest, getDigestPassword, getDigestSecret, getPasswordDigest, getPrincipalCacheSize, getUserPrincipal, login, loginDigest, loginDigestImpl, logout, setPasswordDigest, setPrincipalCacheSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResinAuthenticatorAdapter

public ResinAuthenticatorAdapter()
Method Detail

isUserInRole

public boolean isUserInRole(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            javax.servlet.ServletContext context,
                            java.security.Principal principal,
                            java.lang.String s)
                     throws javax.servlet.ServletException
This doesn't seem to make much sense in a deployment environment, as the roles should be set in web.xml? (Or perhaps I haven't had enough sleep today)

Throws:
javax.servlet.ServletException

init

public void init()
          throws javax.servlet.ServletException
Initializes this Authenticator.

Throws:
javax.servlet.ServletException

getUserPrincipalImpl

protected java.security.Principal getUserPrincipalImpl(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.ServletContext context)
                                                throws javax.servlet.ServletException
Not sure how this should work in an OSUser sense. Where should the username be pulled from? (The Caucho example Authenticators all use a special cookie here)

Throws:
javax.servlet.ServletException

loginImpl

protected java.security.Principal loginImpl(java.lang.String username,
                                            java.lang.String password)
Look up a user given a username, authenticate their password and return the user if they authenticate.


loginImpl

protected java.security.Principal loginImpl(javax.servlet.http.HttpServletRequest request,
                                            javax.servlet.http.HttpServletResponse response,
                                            javax.servlet.ServletContext context,
                                            java.lang.String s,
                                            java.lang.String s1)
                                     throws javax.servlet.ServletException
Delegates to lookup based on username and password

Throws:
javax.servlet.ServletException

See www.opensymphony.com for more information.