Search in sources :

Example 6 with AuthenticationManager

use of com.gitblit.manager.AuthenticationManager in project gitblit by gitblit.

the class RedmineAuthenticationTest method newAuthenticationManager.

AuthenticationManager newAuthenticationManager() {
    XssFilter xssFilter = new AllowXssFilter();
    RuntimeManager runtime = new RuntimeManager(getSettings(), xssFilter, GitBlitSuite.BASEFOLDER).start();
    UserManager users = new UserManager(runtime, null).start();
    RedmineAuthProvider redmine = new RedmineAuthProvider();
    redmine.setup(runtime, users);
    redmine.setTestingCurrentUserAsJson(JSON);
    AuthenticationManager auth = new AuthenticationManager(runtime, users);
    auth.addAuthenticationProvider(redmine);
    return auth;
}
Also used : AuthenticationManager(com.gitblit.manager.AuthenticationManager) UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) RuntimeManager(com.gitblit.manager.RuntimeManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) RedmineAuthProvider(com.gitblit.auth.RedmineAuthProvider)

Aggregations

AuthenticationManager (com.gitblit.manager.AuthenticationManager)6 RuntimeManager (com.gitblit.manager.RuntimeManager)4 XssFilter (com.gitblit.utils.XssFilter)4 AllowXssFilter (com.gitblit.utils.XssFilter.AllowXssFilter)4 UserManager (com.gitblit.manager.UserManager)3 UserModel (com.gitblit.models.UserModel)3 IRuntimeManager (com.gitblit.manager.IRuntimeManager)2 Test (org.junit.Test)2 IUserService (com.gitblit.IUserService)1 HtpasswdAuthProvider (com.gitblit.auth.HtpasswdAuthProvider)1 RedmineAuthProvider (com.gitblit.auth.RedmineAuthProvider)1 IAuthenticationManager (com.gitblit.manager.IAuthenticationManager)1 IUserManager (com.gitblit.manager.IUserManager)1 TeamModel (com.gitblit.models.TeamModel)1 MemorySettings (com.gitblit.tests.mock.MemorySettings)1 SshDaemonClient (com.gitblit.transport.ssh.SshDaemonClient)1 SshKrbAuthenticator (com.gitblit.transport.ssh.SshKrbAuthenticator)1 HashMap (java.util.HashMap)1 List (java.util.List)1 GSSAuthenticator (org.apache.sshd.server.auth.gss.GSSAuthenticator)1