public class SingleUserLoginService
extends MappedLoginService
Password
utility to create the hashed or
encrypted versions.
This LoginService does currently not support definition of user roles, so the security handler must be configured to
allow access for "any role" if used with this LoginService (e.g. for the ConstraintSecurityHandler
the
"Strict" option must be disabled).
Example for usage in jetty.xml:
<Call name="addBean"> <Arg> <New id="LoginService" class="org.eclipse.smila.http.server.jetty.SingleUserLoginService"> <Set name="name">SMILA Realm</Set> <Set name="user">admin</Set> <Set name="password">MD5:21232f297a57a5a743894a0e4a801fc3</Set> </New> </Arg> </Call>
Constructor and Description |
---|
SingleUserLoginService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
java.lang.String |
getPassword() |
java.lang.String |
getUser() |
protected UserIdentity |
loadUser(java.lang.String username) |
protected void |
loadUsers() |
void |
setPassword(java.lang.String password)
set password to accept, as plain text, MD5 hash, or encrypted.
|
void |
setUser(java.lang.String userName)
set user name to accept.
|
public java.lang.String getUser()
public void setUser(java.lang.String userName)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
protected void doStart() throws java.lang.Exception
java.lang.Exception
protected UserIdentity loadUser(java.lang.String username)
protected void loadUsers() throws java.io.IOException
java.io.IOException