com.caucho.security
Class AnonymousAuthenticator

java.lang.Object
  extended by com.caucho.security.AbstractAuthenticator
      extended by com.caucho.security.AnonymousAuthenticator
All Implemented Interfaces:
HandleAware, Authenticator, java.io.Serializable
Direct Known Subclasses:
AnonymousAuthenticator

public class AnonymousAuthenticator
extends AbstractAuthenticator

The anonymous authenticator always succeeds

 <authenticator url="anonymous:"/>
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.security.AbstractAuthenticator
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, NULL_USER
 
Constructor Summary
AnonymousAuthenticator()
           
 
Method Summary
protected  java.security.Principal authenticate(java.security.Principal user, PasswordCredentials cred, java.lang.Object details)
          Authenticate (login) the user.
 boolean isUserInRole(java.security.Principal user, java.lang.String role)
          The anonymous user is in the "user" role
 
Methods inherited from class com.caucho.security.AbstractAuthenticator
addRoleMapping, authenticate, authenticate, authenticate, authenticate, digest, getAlgorithm, getDigest, getDigestSecret, getDigestSecret, getLogoutOnSessionTimeout, getPasswordDigest, getPasswordDigest, getPasswordDigestAlgorithm, getPasswordDigestRealm, getPasswordUser, getPasswordUser, getSingleSignon, init, logout, setLogoutOnSessionTimeout, setPasswordDigest, setPasswordDigestAlgorithm, setPasswordDigestRealm, setSerializationHandle, stringToDigest, toString, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnonymousAuthenticator

public AnonymousAuthenticator()
Method Detail

authenticate

protected java.security.Principal authenticate(java.security.Principal user,
                                               PasswordCredentials cred,
                                               java.lang.Object details)
Authenticate (login) the user.

Overrides:
authenticate in class AbstractAuthenticator

isUserInRole

public boolean isUserInRole(java.security.Principal user,
                            java.lang.String role)
The anonymous user is in the "user" role

Specified by:
isUserInRole in interface Authenticator
Overrides:
isUserInRole in class AbstractAuthenticator
Parameters:
request - the servlet request
user - the user to test
role - the role to test