Refactoring webscript authentication to deal with redirecting etc. when no valid authentication for the script is available

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5718 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-18 09:25:38 +00:00
parent 23d297ac26
commit b56f065c94
9 changed files with 47 additions and 46 deletions

View File

@@ -60,7 +60,7 @@ public class BasicHttpAuthenticator implements WebScriptServletAuthenticator
/* (non-Javadoc)
* @see org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)
*/
public void authenticate(RequiredAuthentication required, boolean isGuest, HttpServletRequest req, HttpServletResponse res)
public boolean authenticate(RequiredAuthentication required, boolean isGuest, HttpServletRequest req, HttpServletResponse res)
{
boolean authorized = false;
@@ -146,6 +146,7 @@ public class BasicHttpAuthenticator implements WebScriptServletAuthenticator
res.setStatus(401);
res.setHeader("WWW-Authenticate", "Basic realm=\"Alfresco\"");
}
return authorized;
}
}