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;
}
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;
}
Aggregations