diff --git a/src/helma/framework/core/Session.java b/src/helma/framework/core/Session.java index 391e3c24..9f005a4d 100644 --- a/src/helma/framework/core/Session.java +++ b/src/helma/framework/core/Session.java @@ -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. */ diff --git a/src/helma/framework/core/SessionBean.java b/src/helma/framework/core/SessionBean.java index 1385a747..5bbe11b9 100644 --- a/src/helma/framework/core/SessionBean.java +++ b/src/helma/framework/core/SessionBean.java @@ -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); } /**