|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.security.AbstractAuthenticator
com.caucho.security.XmlAuthenticator
@Singleton public class XmlAuthenticator
The XML authenticator reads a static file for authentication.
<resin:XmlAuthenticator path="WEB-INF/users.xml"/>
The format of the static file is as follows:
<users>
<user name="h.potter" password="quidditch" roles="user,captain"/>
...
</users>
The authenticator can also be configured in the resin-web.xml:
<resin:XmlAuthenticator password-digest="none">
<user name="Harry Potter" password="quidditch" roles="user,captain"/>
</resin:XmlAuthenticator>
Nested Class Summary | |
---|---|
class |
XmlAuthenticator.User
|
Field Summary |
---|
Fields inherited from class com.caucho.security.AbstractAuthenticator |
---|
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, NULL_USER |
Constructor Summary | |
---|---|
XmlAuthenticator()
|
Method Summary | |
---|---|
void |
addUser(XmlAuthenticator.User user)
Adds a user from the configuration. |
XmlAuthenticator.User |
createUser()
Adds a user from the configuration. |
protected java.lang.String |
getDefaultGroup()
Returns the default group for a user |
protected PasswordUser |
getPasswordUser(java.lang.String userName)
Returns the PasswordUser |
Path |
getPath()
Gets the path to the XML file. |
protected java.util.Hashtable<java.lang.String,PasswordUser> |
getUserMap()
Returns the user map |
void |
init()
Initialize the XML authenticator. |
void |
reload()
Reload the authenticator. |
void |
setPath(Path path)
Sets the path to the XML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XmlAuthenticator()
Method Detail |
---|
public void setPath(Path path)
public Path getPath()
protected java.lang.String getDefaultGroup()
public XmlAuthenticator.User createUser()
<init user='Harry Potter:quidditch:user,webdav'/>
public void addUser(XmlAuthenticator.User user)
<init user='Harry Potter:quidditch:user,webdav'/>
protected java.util.Hashtable<java.lang.String,PasswordUser> getUserMap()
@PostConstruct public void init() throws ServletException
init
in class AbstractAuthenticator
ServletException
protected PasswordUser getPasswordUser(java.lang.String userName)
getPasswordUser
in class AbstractAuthenticator
userName
- the string user name
public void reload()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |