@Service public class PropertiesAuthenticator extends AbstractAuthenticator
<sec:PropertiesAuthenticator 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:
<sec:PropertiesAuthenticator password-digest="none">
Harry Potter=quidditch,user,captain
</sec:PropertiesAuthenticator>
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, NULL_USER
Constructor and Description |
---|
PropertiesAuthenticator() |
Modifier and Type | Method and Description |
---|---|
void |
addUser(java.lang.String name,
java.lang.String password) |
protected PasswordUser |
createUser(java.lang.String name,
java.lang.String value)
Creates the password user based on a name and a comma-separated value
|
protected PasswordUser |
getPasswordUser(java.lang.String userName)
Returns the PasswordUser
|
Path |
getPath()
Gets the path to the property file.
|
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() |
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, writeReplace
public void setPath(Path path)
public Path getPath()
public void setValue(java.util.Properties value)
<init value='Harry Potter=quidditch,user,webdav'/>
public void addUser(java.lang.String name, java.lang.String password)
@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 nameprotected void reload()
protected PasswordUser createUser(java.lang.String name, java.lang.String value)
public java.lang.String toString()
toString
in class AbstractAuthenticator