Implement Session.login(userName, password)
This commit is contained in:
parent
e51725aba0
commit
6ad5e1ae28
2 changed files with 12 additions and 3 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue