com.caucho.server.security
Class PropertyAuthenticator

java.lang.Object
  extended by com.caucho.server.security.AbstractAuthenticator
      extended by com.caucho.server.security.AbstractPasswordAuthenticator
          extended by com.caucho.server.security.PropertyAuthenticator
All Implemented Interfaces:
ServletAuthenticator, HandleAware, java.io.Serializable

public class PropertyAuthenticator
extends AbstractPasswordAuthenticator

The Property authenticator reads a properties file for authentication.

 <authenticator url="prop:path=WEB-INF/users.xml"/>
 

The format of the static file is as follows:

 h.potter=password,user,captain
 

The authenticator can also be configured in the resin-web.xml:

 <authenticator url="prop:password-digest=none">
   <init>
     Harry Potter=quidditch,user,captain
   </init>
 </authenticator>
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.server.security.AbstractAuthenticator
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, _principalCache, _principalCacheSize, LOGIN_NAME
 
Constructor Summary
PropertyAuthenticator()
           
 
Method Summary
protected  PasswordUser createUser(java.lang.String name, java.lang.String value)
          Creates the password user based on a name and a comma-separated value
 Path getPath()
          Gets the path to the property file.
protected  PasswordUser getUser(java.lang.String userName)
          Returns the PasswordUser
 void init()
          Initialize the properties authenticator.
protected  void reload()
          Reload the authenticator.
 void setPath(Path path)
          Sets the path to the property file.
 void setValue(java.util.Properties value)
          Sets the properties value
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.server.security.AbstractPasswordAuthenticator
getDigestPassword, getUser, isUserInRole, loginImpl
 
Methods inherited from class com.caucho.server.security.AbstractAuthenticator
addRoleMapping, digest, getDigestSecret, getLogoutOnSessionTimeout, getPasswordDigest, getPasswordDigest, getPasswordDigestAlgorithm, getPasswordDigestRealm, getPrincipalCacheSize, getUserPrincipal, getUserPrincipalImpl, login, loginDigest, loginDigestImpl, logout, logout, logout, setLogoutOnSessionTimeout, setPasswordDigest, setPasswordDigestAlgorithm, setPasswordDigestRealm, setPrincipalCacheSize, setSerializationHandle, stringToDigest, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyAuthenticator

public PropertyAuthenticator()
Method Detail

setPath

public void setPath(Path path)
Sets the path to the property file.


getPath

public Path getPath()
Gets the path to the property file.


setValue

public void setValue(java.util.Properties value)
Sets the properties value
 <init value='Harry Potter=quidditch,user,webdav'/>
 


init

public void init()
          throws ServletException
Initialize the properties authenticator.

Specified by:
init in interface ServletAuthenticator
Overrides:
init in class AbstractAuthenticator
Throws:
ServletException

getUser

protected PasswordUser getUser(java.lang.String userName)
Returns the PasswordUser

Specified by:
getUser in class AbstractPasswordAuthenticator
Parameters:
userName - the string user name
Returns:
the populated PasswordUser value

reload

protected void reload()
Reload the authenticator.


createUser

protected PasswordUser createUser(java.lang.String name,
                                  java.lang.String value)
Creates the password user based on a name and a comma-separated value


toString

public java.lang.String toString()
Overrides:
toString in class AbstractAuthenticator