summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/auth
diff options
context:
space:
mode:
authorRodrigo Andrade <rodrigo_cardoso@hotmail.it>2016-08-15 18:24:24 -0300
committerRodrigo Andrade <rodrigo_cardoso@hotmail.it>2016-08-15 18:24:24 -0300
commit4365c8f0b0410f540118868bbfc30f6974db3008 (patch)
tree5d7c5dc30fdb1b362529899e12effd1947c9be48 /src/main/java/com/gitblit/auth
parentb453703aa83f9e3b1605190aed3356fec9d46155 (diff)
downloadgitblit-4365c8f0b0410f540118868bbfc30f6974db3008.tar.gz
gitblit-4365c8f0b0410f540118868bbfc30f6974db3008.zip
removing unecessary user cookie code
Diffstat (limited to 'src/main/java/com/gitblit/auth')
-rw-r--r--src/main/java/com/gitblit/auth/AuthenticationProvider.java4
-rw-r--r--src/main/java/com/gitblit/auth/HtpasswdAuthProvider.java2
-rw-r--r--src/main/java/com/gitblit/auth/LdapAuthProvider.java2
-rw-r--r--src/main/java/com/gitblit/auth/PAMAuthProvider.java2
-rw-r--r--src/main/java/com/gitblit/auth/RedmineAuthProvider.java2
-rw-r--r--src/main/java/com/gitblit/auth/SalesforceAuthProvider.java2
-rw-r--r--src/main/java/com/gitblit/auth/WindowsAuthProvider.java2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/gitblit/auth/AuthenticationProvider.java b/src/main/java/com/gitblit/auth/AuthenticationProvider.java
index 6c098859..e359fd7e 100644
--- a/src/main/java/com/gitblit/auth/AuthenticationProvider.java
+++ b/src/main/java/com/gitblit/auth/AuthenticationProvider.java
@@ -78,9 +78,9 @@ public abstract class AuthenticationProvider {
public abstract AuthenticationType getAuthenticationType();
- protected void setCookie(UserModel user, char [] password) {
+ protected void setCookie(UserModel user) {
// create a user cookie
- if (StringUtils.isEmpty(user.cookie) && !ArrayUtils.isEmpty(password)) {
+ if (StringUtils.isEmpty(user.cookie)) {
user.cookie = user.createCookie();
}
}
diff --git a/src/main/java/com/gitblit/auth/HtpasswdAuthProvider.java b/src/main/java/com/gitblit/auth/HtpasswdAuthProvider.java
index 2cdabf6f..3a6cb8ec 100644
--- a/src/main/java/com/gitblit/auth/HtpasswdAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/HtpasswdAuthProvider.java
@@ -196,7 +196,7 @@ public class HtpasswdAuthProvider extends UsernamePasswordAuthenticationProvider
}
// create a user cookie
- setCookie(user, password);
+ setCookie(user);
// Set user attributes, hide password from backing user service.
user.password = Constants.EXTERNAL_ACCOUNT;
diff --git a/src/main/java/com/gitblit/auth/LdapAuthProvider.java b/src/main/java/com/gitblit/auth/LdapAuthProvider.java
index cc772e7b..b7efd4a0 100644
--- a/src/main/java/com/gitblit/auth/LdapAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/LdapAuthProvider.java
@@ -360,7 +360,7 @@ public class LdapAuthProvider extends UsernamePasswordAuthenticationProvider {
}
// create a user cookie
- setCookie(user, password);
+ setCookie(user);
if (!supportsTeamMembershipChanges()) {
getTeamsFromLdap(ldapConnection, simpleUsername, loggingInUser, user);
diff --git a/src/main/java/com/gitblit/auth/PAMAuthProvider.java b/src/main/java/com/gitblit/auth/PAMAuthProvider.java
index 46f4dd6a..b38d49df 100644
--- a/src/main/java/com/gitblit/auth/PAMAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/PAMAuthProvider.java
@@ -122,7 +122,7 @@ public class PAMAuthProvider extends UsernamePasswordAuthenticationProvider {
}
// create a user cookie
- setCookie(user, password);
+ setCookie(user);
// update user attributes from UnixUser
user.accountType = getAccountType();
diff --git a/src/main/java/com/gitblit/auth/RedmineAuthProvider.java b/src/main/java/com/gitblit/auth/RedmineAuthProvider.java
index 27cece29..364aff04 100644
--- a/src/main/java/com/gitblit/auth/RedmineAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/RedmineAuthProvider.java
@@ -139,7 +139,7 @@ public class RedmineAuthProvider extends UsernamePasswordAuthenticationProvider
}
// create a user cookie
- setCookie(user, password);
+ setCookie(user);
// update user attributes from Redmine
user.accountType = getAccountType();
diff --git a/src/main/java/com/gitblit/auth/SalesforceAuthProvider.java b/src/main/java/com/gitblit/auth/SalesforceAuthProvider.java
index df033c27..79c3a0c4 100644
--- a/src/main/java/com/gitblit/auth/SalesforceAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/SalesforceAuthProvider.java
@@ -66,7 +66,7 @@ public class SalesforceAuthProvider extends UsernamePasswordAuthenticationProvid
user = new UserModel(simpleUsername);
}
- setCookie(user, password);
+ setCookie(user);
setUserAttributes(user, info);
updateUser(user);
diff --git a/src/main/java/com/gitblit/auth/WindowsAuthProvider.java b/src/main/java/com/gitblit/auth/WindowsAuthProvider.java
index aee51008..4c31fb15 100644
--- a/src/main/java/com/gitblit/auth/WindowsAuthProvider.java
+++ b/src/main/java/com/gitblit/auth/WindowsAuthProvider.java
@@ -153,7 +153,7 @@ public class WindowsAuthProvider extends UsernamePasswordAuthenticationProvider
}
// create a user cookie
- setCookie(user, password);
+ setCookie(user);
// update user attributes from Windows identity
user.accountType = getAccountType();