From 7cb82b858b853ef3d09d85853573ec91b038547a Mon Sep 17 00:00:00 2001 From: mallowlabs <mallowlabs@gmail.com> Date: Sat, 08 Sep 2012 10:50:51 -0400 Subject: [PATCH] Added cookie suport --- src/com/gitblit/RedmineUserService.java | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/com/gitblit/RedmineUserService.java b/src/com/gitblit/RedmineUserService.java index 6ff61c7..47bb80a 100644 --- a/src/com/gitblit/RedmineUserService.java +++ b/src/com/gitblit/RedmineUserService.java @@ -11,6 +11,7 @@ import com.gitblit.models.UserModel; import com.gitblit.utils.ConnectionUtils; +import com.gitblit.utils.StringUtils; import com.google.gson.Gson; /** @@ -72,11 +73,6 @@ } @Override - public boolean supportsCookies() { - return false; - } - - @Override public UserModel authenticate(String username, char[] password) { String urlText = this.settings.getString(Keys.realm.redmine.url, ""); if (!urlText.endsWith("/")) { @@ -95,6 +91,7 @@ userModel.displayName = current.user.firstname + " " + current.user.lastname; userModel.emailAddress = current.user.mail; userModel.canAdmin = true; + userModel.cookie = StringUtils.getSHA1(userModel.username + new String(password)); return userModel; } -- Gitblit v1.9.1