|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.web.auth.BaseAuthenticator velosurf.web.auth.SimpleDBAuthenticator
public class SimpleDBAuthenticator
Authenticator basic implementation.
It accepts the four following parameters in toolbox.xml
:
method
(inherited from BaseAuthenticator
) the encryption method to use (default to none,
an example client-side javascript encryption is provided for the method HmacMD5).user-by-login
name of the Velosurf root attribute that returns a user given its login.login-parameter
name of the external parameter 'login' in the previous attribute.password-field
name of the password field.
Field Summary | |
---|---|
private java.util.Map |
config
configuration. |
protected DBReference |
db
database. |
private static java.lang.String |
LOGIN_PARAMETER_DEFAULT
default name for the "login" parameter. |
private static java.lang.String |
LOGIN_PARAMETER_KEY
key used in toolbox.xml to indicate the name of the login parameter in the "user by login" attribute. |
private java.lang.String |
loginParameter
login parameter name |
private static java.lang.String |
PASSWORD_FIELD_DEFAULT
default name of the "password" field. |
private static java.lang.String |
PASSWORD_FIELD_KEY
key used in toolbox.xml to indicate the name of the password field in the "user by login" attribute. |
private java.lang.String |
passwordField
password field name |
private static java.lang.String |
USER_BY_LOGIN_DEFAULT
default name of the "user by login" root attribute. |
private static java.lang.String |
USER_BY_LOGIN_KEY
key used in toolbox.xml to indicate the "user by login" root attribute. |
private java.lang.String |
userByLogin
"user by login" root attribute name. |
Constructor Summary | |
---|---|
SimpleDBAuthenticator()
|
Method Summary | |
---|---|
void |
configure(java.util.Map map)
configure this tool. |
java.lang.String |
getPassword(java.lang.String login)
get the password for this login. |
java.lang.Object |
getUser(java.lang.String login)
get the user object for this login. |
void |
init(java.lang.Object initData)
initialize this tool. |
protected void |
initDB(javax.servlet.ServletContext ctx)
|
void |
setDBReference(DBReference db)
externally set the db reference |
Methods inherited from class velosurf.web.auth.BaseAuthenticator |
---|
checkLogin, getChallenge, getLoggedUser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DBReference db
private static final java.lang.String USER_BY_LOGIN_KEY
private static final java.lang.String LOGIN_PARAMETER_KEY
private static final java.lang.String PASSWORD_FIELD_KEY
private static final java.lang.String USER_BY_LOGIN_DEFAULT
private static final java.lang.String LOGIN_PARAMETER_DEFAULT
private static final java.lang.String PASSWORD_FIELD_DEFAULT
private java.util.Map config
private java.lang.String userByLogin
private java.lang.String loginParameter
private java.lang.String passwordField
Constructor Detail |
---|
public SimpleDBAuthenticator()
Method Detail |
---|
public void init(java.lang.Object initData)
init
in class BaseAuthenticator
initData
- a view contextprotected void initDB(javax.servlet.ServletContext ctx)
public void setDBReference(DBReference db)
db
- DBReferencepublic java.lang.String getPassword(java.lang.String login)
getPassword
in class BaseAuthenticator
login
- login
public java.lang.Object getUser(java.lang.String login)
getUser
in class BaseAuthenticator
login
- login
public void configure(java.util.Map map)
configure
in class BaseAuthenticator
map
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |