mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- AJAX framework now handles unauthenticated requests properly
- Removed JavaScript layer above dojo - Minor updates following wiki writeup git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3331 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -103,8 +103,22 @@ public abstract class BaseServlet extends HttpServlet
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public AuthenticationStatus servletAuthenticate(HttpServletRequest req, HttpServletResponse res)
|
||||
public AuthenticationStatus servletAuthenticate(HttpServletRequest req, HttpServletResponse res)
|
||||
throws IOException
|
||||
{
|
||||
return servletAuthenticate(req, res, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform an authentication for the servlet request URI. Processing any "ticket" or
|
||||
* "guest" URL arguments.
|
||||
*
|
||||
* @return AuthenticationStatus
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public AuthenticationStatus servletAuthenticate(HttpServletRequest req, HttpServletResponse res,
|
||||
boolean redirectToLoginPage) throws IOException
|
||||
{
|
||||
AuthenticationStatus status;
|
||||
|
||||
@@ -124,9 +138,9 @@ public abstract class BaseServlet extends HttpServlet
|
||||
}
|
||||
status = AuthenticationHelper.authenticate(getServletContext(), req, res, forceGuest);
|
||||
}
|
||||
if (status == AuthenticationStatus.Failure)
|
||||
if (status == AuthenticationStatus.Failure && redirectToLoginPage)
|
||||
{
|
||||
// authentication failed - now need to display the login page to the user
|
||||
// authentication failed - now need to display the login page to the user, if asked to
|
||||
redirectToLoginPage(req, res, getServletContext());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user