com.caucho.security
Class AdminAuthenticator

java.lang.Object
  extended by com.caucho.security.AbstractAuthenticator
      extended by com.caucho.security.XmlAuthenticator
          extended by com.caucho.security.AdminAuthenticator
All Implemented Interfaces:
HandleAware, Authenticator, java.io.Serializable

@Service
@Admin
@Named(value="resin-admin-authenticator")
@Default
public class AdminAuthenticator
extends XmlAuthenticator

The admin authenticator provides authentication for Resin admin/management purposes. It's typically defined at the <resin> level.

 <resin:AdminAuthenticator path="WEB-INF/admin-users.xml"/>
 

The format of the static file is as follows:

 <users>
   <user name="h.potter" password="quidditch" roles="user,captain"/>
   ...
 </users>
 

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.caucho.security.XmlAuthenticator
XmlAuthenticator.User
 
Field Summary
 
Fields inherited from class com.caucho.security.AbstractAuthenticator
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm
 
Constructor Summary
AdminAuthenticator()
           
 
Method Summary
 void addUser(java.lang.String userName, char[] password, java.lang.String[] roles)
           
 java.lang.String getDefaultGroup()
          Returns the default group for a user
 java.lang.String getHash()
          Creates a cookie based on the user hash.
protected  PasswordUser getPasswordUser(java.lang.String userName)
          Abstract method to return a user based on the name
 java.util.Hashtable<java.lang.String,PasswordUser> getUserMap()
          Returns the user map
 void initCache()
           
 boolean isComplete()
           
 void removeUser(java.lang.String userName)
           
 void setComplete(boolean isComplete)
           
 
Methods inherited from class com.caucho.security.XmlAuthenticator
addUser, createUser, getPath, init, reload, setPath
 
Methods inherited from class com.caucho.security.AbstractAuthenticator
addRoleMapping, authenticate, authenticate, authenticate, authenticate, authenticate, digest, getAlgorithm, getDigest, getDigestSecret, getDigestSecret, getLogoutOnSessionTimeout, getPasswordDigest, getPasswordDigest, getPasswordDigestAlgorithm, getPasswordDigestRealm, getPasswordUser, getSingleSignon, isUserInRole, 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

AdminAuthenticator

public AdminAuthenticator()
Method Detail

initCache

public final void initCache()

isComplete

public boolean isComplete()

setComplete

public void setComplete(boolean isComplete)

addUser

public void addUser(java.lang.String userName,
                    char[] password,
                    java.lang.String[] roles)

removeUser

public void removeUser(java.lang.String userName)

getUserMap

public java.util.Hashtable<java.lang.String,PasswordUser> getUserMap()
Description copied from class: XmlAuthenticator
Returns the user map

Overrides:
getUserMap in class XmlAuthenticator

getPasswordUser

protected PasswordUser getPasswordUser(java.lang.String userName)
Abstract method to return a user based on the name

Overrides:
getPasswordUser in class XmlAuthenticator
Parameters:
userName - the string user name
Returns:
the populated PasswordUser value

getHash

public java.lang.String getHash()
Creates a cookie based on the user hash.


getDefaultGroup

public java.lang.String getDefaultGroup()
Description copied from class: XmlAuthenticator
Returns the default group for a user

Overrides:
getDefaultGroup in class XmlAuthenticator