summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/auth/LdapAuthProvider.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-12-11 09:08:26 -0500
committerJames Moger <james.moger@gitblit.com>2013-12-11 09:08:26 -0500
commitc1b0e4a5a3acc31bd469cf498d1ba7d390c379b2 (patch)
tree7d9b26ed2583935edd705d04c6e147cb7afe4a38 /src/main/java/com/gitblit/auth/LdapAuthProvider.java
parent1293c279d1ab41ba7f4721009f87e89d4d48bf3d (diff)
downloadgitblit-c1b0e4a5a3acc31bd469cf498d1ba7d390c379b2.tar.gz
gitblit-c1b0e4a5a3acc31bd469cf498d1ba7d390c379b2.zip
Centralize cookie creation
Change-Id: I1a17416121764f33a8d05a88c80cece0c03ac41d
Diffstat (limited to 'src/main/java/com/gitblit/auth/LdapAuthProvider.java')
-rw-r--r--src/main/java/com/gitblit/auth/LdapAuthProvider.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/auth/LdapAuthProvider.java b/src/main/java/com/gitblit/auth/LdapAuthProvider.java
index 6a2dd437..8fef620d 100644
--- a/src/main/java/com/gitblit/auth/LdapAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/LdapAuthProvider.java
@@ -295,9 +295,7 @@ public class LdapAuthProvider extends UsernamePasswordAuthenticationProvider {
}
// create a user cookie
- if (StringUtils.isEmpty(user.cookie) && !ArrayUtils.isEmpty(password)) {
- user.cookie = StringUtils.getSHA1(user.username + new String(password));
- }
+ setCookie(user, password);
if (!supportsTeamMembershipChanges()) {
getTeamsFromLdap(ldapConnection, simpleUsername, loggingInUser, user);