Search in sources :

Example 1 with HtpasswdAuthProvider

use of com.gitblit.auth.HtpasswdAuthProvider in project gitblit by gitblit.

the class HtpasswdAuthenticationTest method newHtpasswdAuthentication.

private HtpasswdAuthProvider newHtpasswdAuthentication(IStoredSettings settings) {
    XssFilter xssFilter = new AllowXssFilter();
    RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
    UserManager users = new UserManager(runtime, null).start();
    HtpasswdAuthProvider htpasswd = new HtpasswdAuthProvider();
    htpasswd.setup(runtime, users);
    return htpasswd;
}
Also used : UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) RuntimeManager(com.gitblit.manager.RuntimeManager) HtpasswdAuthProvider(com.gitblit.auth.HtpasswdAuthProvider) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter)

Example 2 with HtpasswdAuthProvider

use of com.gitblit.auth.HtpasswdAuthProvider in project gitblit by gitblit.

the class HtpasswdAuthenticationTest method newAuthenticationManager.

private AuthenticationManager newAuthenticationManager(IStoredSettings settings) {
    XssFilter xssFilter = new AllowXssFilter();
    RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
    UserManager users = new UserManager(runtime, null).start();
    HtpasswdAuthProvider htpasswd = new HtpasswdAuthProvider();
    htpasswd.setup(runtime, users);
    AuthenticationManager auth = new AuthenticationManager(runtime, users);
    auth.addAuthenticationProvider(htpasswd);
    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) HtpasswdAuthProvider(com.gitblit.auth.HtpasswdAuthProvider) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter)

Aggregations

HtpasswdAuthProvider (com.gitblit.auth.HtpasswdAuthProvider)2 RuntimeManager (com.gitblit.manager.RuntimeManager)2 UserManager (com.gitblit.manager.UserManager)2 XssFilter (com.gitblit.utils.XssFilter)2 AllowXssFilter (com.gitblit.utils.XssFilter.AllowXssFilter)2 AuthenticationManager (com.gitblit.manager.AuthenticationManager)1