Implement Session.login(userName, password)

This commit is contained in:
hns 2005-03-16 17:29:16 +00:00
parent e51725aba0
commit 6ad5e1ae28
2 changed files with 12 additions and 3 deletions

View file

@ -79,6 +79,17 @@ public class Session implements Serializable {
lastModified = System.currentTimeMillis();
}
/**
* Try logging in this session given the userName and password.
*
* @param userName
* @param password
* @return true if session was logged in.
*/
public boolean login(String userName, String password) {
return app.loginSession(userName, password, this);
}
/**
* remove this sessions's user node.
*/

View file

@ -57,9 +57,7 @@ public class SessionBean implements Serializable {
* @return true if the user exists and the password matches the user's password property.
*/
public boolean login(String username, String password) {
boolean success = session.getApp().loginSession(username, password, session);
return success;
return session.login(username, password);
}
/**