|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.security.AbstractAuthenticator
com.caucho.server.security.AbstractPasswordAuthenticator
com.caucho.server.security.XmlAuthenticator
public class XmlAuthenticator
The XML authenticator reads a static file for authentication.
<authenticator url="xml: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:
<authenticator url="xml:password-digest=none">
<init>
<user name="Harry Potter" password="quidditch" roles="user,captain"/>
</init>
</authenticator>
| Nested Class Summary | |
|---|---|
static class |
XmlAuthenticator.User
|
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.security.AbstractAuthenticator |
|---|
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, _principalCache, _principalCacheSize, LOGIN_NAME |
| Constructor Summary | |
|---|---|
XmlAuthenticator()
|
|
| Method Summary | |
|---|---|
void |
addUser(XmlAuthenticator.User user)
Adds a user from the configuration. |
Path |
getPath()
Gets the path to the XML file. |
protected PasswordUser |
getUser(java.lang.String userName)
Returns the PasswordUser |
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 com.caucho.server.security.AbstractPasswordAuthenticator |
|---|
getDigestPassword, getUser, isUserInRole, loginImpl |
| 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()
public void addUser(XmlAuthenticator.User user)
<init user='Harry Potter:quidditch:user,webdav'/>
public void init()
throws ServletException
init in interface ServletAuthenticatorinit in class AbstractAuthenticatorServletExceptionprotected PasswordUser getUser(java.lang.String userName)
getUser in class AbstractPasswordAuthenticatoruserName - the string user name
public void reload()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||