From 6ad5e1ae282b50922aeda604a627944a4cec3fc0 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 16 Mar 2005 17:29:16 +0000 Subject: [PATCH] Implement Session.login(userName, password) --- src/helma/framework/core/Session.java | 11 +++++++++++ src/helma/framework/core/SessionBean.java | 4 +--- 2 files changed, 12 insertions(+), 3 deletions(-) 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); } /**