protected boolean doAuthenticate(HttpServletRequest pRequest, AuthorizationHeaderParser.Result pAuthInfo) {
try {
String user = pAuthInfo.getUser();
String password = pAuthInfo.getPassword();
final CallbackHandler handler = new UserPasswordCallbackHandler(user, password);
LoginContext loginContext = new LoginContext(realm, handler);
loginContext.login();
pRequest.setAttribute(HttpContext.AUTHENTICATION_TYPE,HttpServletRequest.BASIC_AUTH);
pRequest.setAttribute(HttpContext.REMOTE_USER, user);