diff --git a/source/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java b/source/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java index ccdd0c4e50..75a76b6eae 100644 --- a/source/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java +++ b/source/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2007 Alfresco Software Limited. + * Copyright (C) 2005-2009 Alfresco Software Limited. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/source/java/org/alfresco/repo/web/scripts/servlet/BasicHttpAuthenticatorFactory.java b/source/java/org/alfresco/repo/web/scripts/servlet/BasicHttpAuthenticatorFactory.java index 333a69facc..7e241cc12f 100644 --- a/source/java/org/alfresco/repo/web/scripts/servlet/BasicHttpAuthenticatorFactory.java +++ b/source/java/org/alfresco/repo/web/scripts/servlet/BasicHttpAuthenticatorFactory.java @@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.alfresco.repo.security.authentication.AuthenticationException; -import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.util.Base64; import org.alfresco.web.scripts.Authenticator; @@ -40,7 +39,6 @@ import org.alfresco.web.scripts.servlet.WebScriptServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - /** * HTTP Basic Authentication * @@ -173,20 +171,11 @@ public class BasicHttpAuthenticatorFactory implements ServletAuthenticatorFactor if (logger.isDebugEnabled()) logger.debug("Authenticating (BASIC HTTP) user " + parts[0]); - // assume username and password passed - if (parts[0].equals(AuthenticationUtil.getGuestUserName())) - { - if (required == RequiredAuthentication.guest) - { - authenticationService.authenticateAsGuest(); - authorized = true; - } - } - else - { - authenticationService.authenticate(parts[0], parts[1].toCharArray()); - authorized = true; - } + String username = parts[0]; + // No longer need a special call to authenticate as guest + // Leave guest name resolution up to the services + authenticationService.authenticate(username, parts[1].toCharArray()); + authorized = true; } } catch(AuthenticationException e)