summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/GitBlit.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/GitBlit.java')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java55
1 files changed, 27 insertions, 28 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 0dcc765b..d4e89b02 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -29,13 +29,13 @@ import org.eclipse.jgit.lib.Repository;
import com.gitblit.Constants.FederationRequest;
import com.gitblit.Constants.FederationToken;
+import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.manager.IFederationManager;
import com.gitblit.manager.IGitblitManager;
import com.gitblit.manager.INotificationManager;
import com.gitblit.manager.IProjectManager;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
-import com.gitblit.manager.ISessionManager;
import com.gitblit.manager.IUserManager;
import com.gitblit.models.FederationModel;
import com.gitblit.models.FederationProposal;
@@ -65,7 +65,7 @@ import com.gitblit.models.UserModel;
public class GitBlit implements IRuntimeManager,
INotificationManager,
IUserManager,
- ISessionManager,
+ IAuthenticationManager,
IRepositoryManager,
IProjectManager,
IGitblitManager,
@@ -77,7 +77,7 @@ public class GitBlit implements IRuntimeManager,
private final IUserManager userManager;
- private final ISessionManager sessionManager;
+ private final IAuthenticationManager authenticationManager;
private final IRepositoryManager repositoryManager;
@@ -91,7 +91,7 @@ public class GitBlit implements IRuntimeManager,
IRuntimeManager runtimeManager,
INotificationManager notificationManager,
IUserManager userManager,
- ISessionManager sessionManager,
+ IAuthenticationManager authenticationManager,
IRepositoryManager repositoryManager,
IProjectManager projectManager,
IGitblitManager gitblitManager,
@@ -100,7 +100,7 @@ public class GitBlit implements IRuntimeManager,
this.runtimeManager = runtimeManager;
this.notificationManager = notificationManager;
this.userManager = userManager;
- this.sessionManager = sessionManager;
+ this.authenticationManager = authenticationManager;
this.repositoryManager = repositoryManager;
this.projectManager = projectManager;
this.gitblitManager = gitblitManager;
@@ -239,55 +239,59 @@ public class GitBlit implements IRuntimeManager,
@Override
public UserModel authenticate(String username, char[] password) {
- return sessionManager.authenticate(username, password);
+ return authenticationManager.authenticate(username, password);
}
@Override
public UserModel authenticate(HttpServletRequest httpRequest) {
- return sessionManager.authenticate(httpRequest, false);
+ return authenticationManager.authenticate(httpRequest, false);
}
@Override
public UserModel authenticate(HttpServletRequest httpRequest, boolean requiresCertificate) {
- return sessionManager.authenticate(httpRequest, requiresCertificate);
+ return authenticationManager.authenticate(httpRequest, requiresCertificate);
}
@Override
public void setCookie(HttpServletResponse response, UserModel user) {
- sessionManager.setCookie(response, user);
+ authenticationManager.setCookie(response, user);
}
@Override
public void logout(HttpServletResponse response, UserModel user) {
- sessionManager.logout(response, user);
- }
-
- /*
- * USER MANAGER
- */
-
- @Override
- public boolean supportsAddUser() {
- return userManager.supportsAddUser();
+ authenticationManager.logout(response, user);
}
@Override
public boolean supportsCredentialChanges(UserModel user) {
- return userManager.supportsCredentialChanges(user);
+ return authenticationManager.supportsCredentialChanges(user);
}
@Override
public boolean supportsDisplayNameChanges(UserModel user) {
- return userManager.supportsDisplayNameChanges(user);
+ return authenticationManager.supportsDisplayNameChanges(user);
}
@Override
public boolean supportsEmailAddressChanges(UserModel user) {
- return userManager.supportsEmailAddressChanges(user);
+ return authenticationManager.supportsEmailAddressChanges(user);
}
@Override
public boolean supportsTeamMembershipChanges(UserModel user) {
- return userManager.supportsTeamMembershipChanges(user);
+ return authenticationManager.supportsTeamMembershipChanges(user);
+ }
+
+ @Override
+ public boolean supportsTeamMembershipChanges(TeamModel team) {
+ return authenticationManager.supportsTeamMembershipChanges(team);
+ }
+
+ /*
+ * USER MANAGER
+ */
+
+ @Override
+ public void setup(IRuntimeManager runtimeManager) {
}
@Override
@@ -321,11 +325,6 @@ public class GitBlit implements IRuntimeManager,
}
@Override
- public boolean supportsCookies() {
- return userManager.supportsCookies();
- }
-
- @Override
public String getCookie(UserModel model) {
return userManager.getCookie(model);
}