/** * Register an authenticated Principal and authentication type in our * request, in the current session (if there is one), and with our * SingleSignOn valve, if there is one. Set the appropriate cookie to be * returned. * * @param request * The servlet request we are processing * @param response * The servlet response we are generating * @param principal * The authenticated Principal to be registered * @param authType * The authentication type to be registered * @param username * Username used to authenticate (if any) * @param password * Password used to authenticate (if any) */ public void register(Request request, HttpServletResponse response, Principal principal, String authType, String username, String password) { register(request, response, principal, authType, username, password, alwaysUseSession, cache); }
/** * Register an authenticated Principal and authentication type in our * request, in the current session (if there is one), and with our * SingleSignOn valve, if there is one. Set the appropriate cookie to be * returned. * * @param request * The servlet request we are processing * @param response * The servlet response we are generating * @param principal * The authenticated Principal to be registered * @param authType * The authentication type to be registered * @param username * Username used to authenticate (if any) * @param password * Password used to authenticate (if any) */ public void register(Request request, HttpServletResponse response, Principal principal, String authType, String username, String password) { register(request, response, principal, authType, username, password, alwaysUseSession, cache); }
@Override public void logout(Request request) { register(request, request.getResponse(), null, null, null, null); }
@Override public void logout(Request request) throws ServletException { register(request, request.getResponse(), null, null, null, null); }
@Override public void logout(Request request) throws ServletException { register(request, request.getResponse(), null, null, null, null); }
@Override public void logout(Request request) throws ServletException { register(request, request.getResponse(), null, null, null, null); }
@Override public void logout(Request request) throws ServletException { register(request, request.getResponse(), null, null, null, null); }
@Override public void logout(Request request) throws ServletException { register(request, request.getResponse(), null, null, null, null); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, char[] password, HttpRequest request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, (HttpResponse)request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void login(String username, String password, Request request) throws ServletException { Principal principal = doLogin(request, username, password); register(request, request.getResponse(), principal, getAuthMethod(), username, password); }
@Override public void logout(HttpRequest request) throws ServletException { Session session = getSession(request); if (session != null) { session.setPrincipal(null); session.setAuthType(null); } // principal and authType set to null in the following register(request, (HttpResponse)request.getResponse(), null, null, null, null); }
public void login(Request request, String username, String password) throws ServletException { // Is there an SSO session against which we can try to reauthenticate? String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE); if (ssoId != null) { if (log.isDebugEnabled()) log.debug("SSO Id " + ssoId + " set; attempting " + "reauthentication"); /* Try to reauthenticate using data cached by SSO. If this fails, either the original SSO logon was of DIGEST or SSL (which we can't reauthenticate ourselves because there is no cached username and password), or the realm denied the user's reauthentication for some reason. In either case we have to prompt the user for a logon */ if (reauthenticateFromSSO(ssoId, request)) return; } Realm realm = context.getRealm(); Principal principal = realm.authenticate(username, password); if (principal != null) { register(request, request.getResponseFacade(), principal, Constants.LOGIN_METHOD, username, password); } }
public void login(Request request, String username, String password) throws ServletException { // Is there an SSO session against which we can try to reauthenticate? String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE); if (ssoId != null) { if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) CatalinaLogger.AUTH_LOGGER.debug("SSO Id " + ssoId + " set; attempting " + "reauthentication"); /* Try to reauthenticate using data cached by SSO. If this fails, either the original SSO logon was of DIGEST or SSL (which we can't reauthenticate ourselves because there is no cached username and password), or the realm denied the user's reauthentication for some reason. In either case we have to prompt the user for a logon */ if (reauthenticateFromSSO(ssoId, request)) return; } Realm realm = context.getRealm(); Principal principal = realm.authenticate(username, password); if (principal != null) { register(request, request.getResponseFacade(), principal, Constants.LOGIN_METHOD, username, password); } }