Package com.gitblit.manager

Examples of com.gitblit.manager.AuthenticationManager


    }

    IAuthenticationManager newAuthenticationManager() {
      RuntimeManager runtime = new RuntimeManager(getSettings(), GitBlitSuite.BASEFOLDER).start();
      users = new UserManager(runtime).start();
      AuthenticationManager auth = new AuthenticationManager(runtime, users).start();
      return auth;
    }
View Full Code Here


      RuntimeManager runtime = new RuntimeManager(getSettings(), GitBlitSuite.BASEFOLDER).start();
      UserManager users = new UserManager(runtime).start();
      RedmineAuthProvider redmine = new RedmineAuthProvider();
      redmine.setup(runtime, users);
        redmine.setTestingCurrentUserAsJson(JSON);
      AuthenticationManager auth = new AuthenticationManager(runtime, users);
      auth.addAuthenticationProvider(redmine);
      return auth;
    }
View Full Code Here

        assertNotNull(userModel.cookie);
    }

    @Test
    public void testAuthenticationManager() throws Exception {
      AuthenticationManager auth = newAuthenticationManager();
        UserModel userModel = auth.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
        assertThat(userModel.getName(), is("redmineadminid"));
        assertThat(userModel.getDisplayName(), is("baz foo"));
        assertThat(userModel.emailAddress, is("baz@example.com"));
        assertNotNull(userModel.cookie);
    }
View Full Code Here

    return ldap;
  }
 
  private AuthenticationManager newAuthenticationManager(IStoredSettings settings) {
    RuntimeManager runtime = new RuntimeManager(settings, GitBlitSuite.BASEFOLDER).start();
    AuthenticationManager auth = new AuthenticationManager(runtime, userManager);
    auth.addAuthenticationProvider(newLdapAuthentication(settings));
    return auth;
  }
View Full Code Here

    private AuthenticationManager newAuthenticationManager(IStoredSettings settings) {
      RuntimeManager runtime = new RuntimeManager(settings, GitBlitSuite.BASEFOLDER).start();
      UserManager users = new UserManager(runtime).start();
      HtpasswdAuthProvider htpasswd = new HtpasswdAuthProvider();
      htpasswd.setup(runtime, users);
      AuthenticationManager auth = new AuthenticationManager(runtime, users);
      auth.addAuthenticationProvider(htpasswd);
      return auth;
    }
View Full Code Here

  @Provides @Singleton IAuthenticationManager provideAuthenticationManager(
      IRuntimeManager runtimeManager,
      IUserManager userManager) {

    return new AuthenticationManager(
        runtimeManager,
        userManager);
  }
View Full Code Here

    IAuthenticationManager newAuthenticationManager() {
      XssFilter xssFilter = new AllowXssFilter();
      RuntimeManager runtime = new RuntimeManager(getSettings(), xssFilter, GitBlitSuite.BASEFOLDER).start();
      users = new UserManager(runtime, null).start();
      AuthenticationManager auth = new AuthenticationManager(runtime, users).start();
      return auth;
    }
View Full Code Here

      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;
    }
View Full Code Here

        assertNotNull(userModel.cookie);
    }

    @Test
    public void testAuthenticationManager() throws Exception {
      AuthenticationManager auth = newAuthenticationManager();
        UserModel userModel = auth.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
        assertThat(userModel.getName(), is("redmineadminid"));
        assertThat(userModel.getDisplayName(), is("baz foo"));
        assertThat(userModel.emailAddress, is("baz@example.com"));
        assertNotNull(userModel.cookie);
    }
View Full Code Here

  @Provides @Singleton IAuthenticationManager provideAuthenticationManager(
      IRuntimeManager runtimeManager,
      IUserManager userManager) {

    return new AuthenticationManager(
        runtimeManager,
        userManager);
  }
View Full Code Here

TOP

Related Classes of com.gitblit.manager.AuthenticationManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.