Package com.gitblit.auth

Examples of com.gitblit.auth.RedmineAuthProvider


    }

    RedmineAuthProvider newRedmineAuthentication(IStoredSettings settings) {
      RuntimeManager runtime = new RuntimeManager(settings, GitBlitSuite.BASEFOLDER).start();
      UserManager users = new UserManager(runtime).start();
      RedmineAuthProvider redmine = new RedmineAuthProvider();
      redmine.setup(runtime, users);
      return redmine;
    }
View Full Code Here


    }
   
    AuthenticationManager newAuthenticationManager() {
      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

      return auth;
    }

    @Test
    public void testAuthenticate() throws Exception {
      RedmineAuthProvider redmine = newRedmineAuthentication();
        redmine.setTestingCurrentUserAsJson(JSON);
        UserModel userModel = redmine.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

    RedmineAuthProvider newRedmineAuthentication(IStoredSettings settings) {
      XssFilter xssFilter = new AllowXssFilter();
      RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
      UserManager users = new UserManager(runtime, null).start();
      RedmineAuthProvider redmine = new RedmineAuthProvider();
      redmine.setup(runtime, users);
      return redmine;
    }
View Full Code Here

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

      return auth;
    }

    @Test
    public void testAuthenticate() throws Exception {
      RedmineAuthProvider redmine = newRedmineAuthentication();
        redmine.setTestingCurrentUserAsJson(JSON);
        UserModel userModel = redmine.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

TOP

Related Classes of com.gitblit.auth.RedmineAuthProvider

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.