luehe 2005/02/18 15:35:18 Modified: catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java NonLoginAuthenticator.java SSLAuthenticator.java SingleSignOn.java Log: Undid previous commit Revision Changes Path 1.17 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java Index: FormAuthenticator.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- FormAuthenticator.java 18 Feb 2005 18:00:22 -0000 1.16 +++ FormAuthenticator.java 18 Feb 2005 23:35:18 -0000 1.17 @@ -272,8 +272,8 @@ if (session == null) session = request.getSessionInternal(false); if (session == null) { - if (log.isDebugEnabled()) - log.debug("User took so long to log on the session expired"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("User took so long to log on the session expired"); response.sendError(HttpServletResponse.SC_REQUEST_TIMEOUT, sm.getString("authenticator.sessionExpired")); return (false); 1.9 +3 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/NonLoginAuthenticator.java Index: NonLoginAuthenticator.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/NonLoginAuthenticator.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- NonLoginAuthenticator.java 18 Feb 2005 18:00:22 -0000 1.8 +++ NonLoginAuthenticator.java 18 Feb 2005 23:35:18 -0000 1.9 @@ -23,8 +23,7 @@ import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.deploy.LoginConfig; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; + /** @@ -39,9 +38,6 @@ extends AuthenticatorBase { - private static Log log = LogFactory.getLog(NonLoginAuthenticator.class); - - // ----------------------------------------------------- Instance Variables @@ -95,8 +91,8 @@ associate(ssoId, getSession(request, true)); */ - if (log.isDebugEnabled()) - log.debug("User authentication is not required"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("User authentication is not required"); return (true); 1.20 +9 -13 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/SSLAuthenticator.java Index: SSLAuthenticator.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/SSLAuthenticator.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- SSLAuthenticator.java 18 Feb 2005 18:00:22 -0000 1.19 +++ SSLAuthenticator.java 18 Feb 2005 23:35:18 -0000 1.20 @@ -30,8 +30,7 @@ import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.deploy.LoginConfig; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; + /** @@ -46,9 +45,6 @@ extends AuthenticatorBase { - private static Log log = LogFactory.getLog(SSLAuthenticator.class); - - // ------------------------------------------------------------- Properties @@ -93,8 +89,8 @@ Principal principal = request.getUserPrincipal(); //String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE); if (principal != null) { - if (log.isDebugEnabled()) - log.debug("Already authenticated '" + principal.getName() + "'"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Already authenticated '" + principal.getName() + "'"); // Associate the session with any existing SSO session in order // to get coordinated session invalidation at logout String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE); @@ -129,8 +125,8 @@ */ // Retrieve the certificate chain for this client - if (log.isDebugEnabled()) - log.debug(" Looking up certificates"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" Looking up certificates"); X509Certificate certs[] = (X509Certificate[]) request.getAttribute(Globals.CERTIFICATES_ATTR); @@ -141,8 +137,8 @@ request.getAttribute(Globals.CERTIFICATES_ATTR); } if ((certs == null) || (certs.length < 1)) { - if (log.isDebugEnabled()) - log.debug(" No certificates included with this request"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" No certificates included with this request"); response.sendError(HttpServletResponse.SC_BAD_REQUEST, sm.getString("authenticator.certificates")); return (false); @@ -151,8 +147,8 @@ // Authenticate the specified certificate chain principal = context.getRealm().authenticate(certs); if (principal == null) { - if (log.isDebugEnabled()) - log.debug(" Realm.authenticate() returned false"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" Realm.authenticate() returned false"); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, sm.getString("authenticator.unauthorized")); return (false); 1.21 +28 -33 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/SingleSignOn.java Index: SingleSignOn.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/SingleSignOn.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- SingleSignOn.java 18 Feb 2005 18:00:22 -0000 1.20 +++ SingleSignOn.java 18 Feb 2005 23:35:18 -0000 1.21 @@ -37,8 +37,6 @@ import org.apache.catalina.util.LifecycleSupport; import org.apache.catalina.util.StringManager; import org.apache.catalina.valves.ValveBase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; /** @@ -67,9 +65,6 @@ implements Lifecycle, SessionListener { - private static Log log = LogFactory.getLog(SingleSignOn.class); - - // ----------------------------------------------------- Instance Variables @@ -285,8 +280,8 @@ // Look up the single session id associated with this session (if any) Session session = event.getSession(); - if (log.isDebugEnabled()) - log.debug("Process session destroyed on " + session); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Process session destroyed on " + session); String ssoId = null; synchronized (reverse) { @@ -341,19 +336,19 @@ request.removeNote(Constants.REQ_SSOID_NOTE); // Has a valid user already been authenticated? - if (log.isDebugEnabled()) - log.debug("Process request for '" + request.getRequestURI() + "'"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Process request for '" + request.getRequestURI() + "'"); if (request.getUserPrincipal() != null) { - if (log.isDebugEnabled()) - log.debug(" Principal '" + request.getUserPrincipal().getName() + + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" Principal '" + request.getUserPrincipal().getName() + "' has already been authenticated"); getNext().invoke(request, response); return; } // Check for the single sign on cookie - if (log.isDebugEnabled()) - log.debug(" Checking for SSO cookie"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" Checking for SSO cookie"); Cookie cookie = null; Cookie cookies[] = request.getCookies(); if (cookies == null) @@ -365,19 +360,19 @@ } } if (cookie == null) { - if (log.isDebugEnabled()) - log.debug(" SSO cookie is not present"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" SSO cookie is not present"); getNext().invoke(request, response); return; } // Look up the cached Principal associated with this cookie value - if (log.isDebugEnabled()) - log.debug(" Checking for cached principal for " + cookie.getValue()); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" Checking for cached principal for " + cookie.getValue()); SingleSignOnEntry entry = lookup(cookie.getValue()); if (entry != null) { - if (log.isDebugEnabled()) - log.debug(" Found cached principal '" + + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" Found cached principal '" + entry.getPrincipal().getName() + "' with auth type '" + entry.getAuthType() + "'"); request.setNote(Constants.REQ_SSOID_NOTE, cookie.getValue()); @@ -387,8 +382,8 @@ request.setUserPrincipal(entry.getPrincipal()); } } else { - if (log.isDebugEnabled()) - log.debug(" No cached principal found, erasing SSO cookie"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug(" No cached principal found, erasing SSO cookie"); cookie.setMaxAge(0); response.addCookie(cookie); } @@ -430,8 +425,8 @@ */ protected void associate(String ssoId, Session session) { - if (log.isDebugEnabled()) - log.debug("Associate sso id " + ssoId + " with session " + session); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Associate sso id " + ssoId + " with session " + session); SingleSignOnEntry sso = lookup(ssoId); if (sso != null) @@ -480,8 +475,8 @@ */ protected void deregister(String ssoId) { - if (log.isDebugEnabled()) - log.debug("Deregistering sso id '" + ssoId + "'"); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Deregistering sso id '" + ssoId + "'"); // Look up and remove the corresponding SingleSignOnEntry SingleSignOnEntry sso = null; @@ -495,8 +490,8 @@ // Expire any associated sessions Session sessions[] = sso.findSessions(); for (int i = 0; i < sessions.length; i++) { - if (log.isTraceEnabled()) - log.trace(" Invalidating session " + sessions[i]); + if (container.getLogger().isTraceEnabled()) + container.getLogger().trace(" Invalidating session " + sessions[i]); // Remove from reverse cache first to avoid recursion synchronized (reverse) { reverse.remove(sessions[i]); @@ -575,8 +570,8 @@ protected void register(String ssoId, Principal principal, String authType, String username, String password) { - if (log.isDebugEnabled()) - log.debug("Registering sso id '" + ssoId + "' for user '" + + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Registering sso id '" + ssoId + "' for user '" + principal.getName() + "' with auth type '" + authType + "'"); synchronized (cache) { @@ -617,8 +612,8 @@ SingleSignOnEntry sso = lookup(ssoId); if (sso != null && !sso.getCanReauthenticate()) { - if (log.isDebugEnabled()) - log.debug("Update sso id " + ssoId + " to auth type " + authType); + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Update sso id " + ssoId + " to auth type " + authType); synchronized(sso) { sso.updateCredentials(principal, authType, username, password); @@ -652,8 +647,8 @@ */ protected void removeSession(String ssoId, Session session) { - if (log.isDebugEnabled()) - log.debug("Removing session " + session.toString() + " from sso id " + + if (container.getLogger().isDebugEnabled()) + container.getLogger().debug("Removing session " + session.toString() + " from sso id " + ssoId ); // Get a reference to the SingleSignOn
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]