Guillaume Lucazeau created SLING-5636:
-----------------------------------------

             Summary: Form Authentication handler does not redirect to login 
form with non ROOT context
                 Key: SLING-5636
                 URL: https://issues.apache.org/jira/browse/SLING-5636
             Project: Sling
          Issue Type: Bug
          Components: Authentication
    Affects Versions: Auth Core 1.3.12
            Reporter: Guillaume Lucazeau


When using the form authentication bundle with a servlet context path != ROOT, 
accessing content requiring authentication redirects you to Sling home page 
instead of your form because the redirection doesn't contain the context path:

*INFO* [qtp1841606468-42] org.apache.sling.auth.core.impl.SlingAuthenticator 
getAnonymousResolver: Anonymous access not allowed by configuration - 
requesting credentials
01.04.2016 17:16:50.210 *WARN* [qtp1841606468-42] 
org.apache.sling.auth.core.AuthUtil isRedirectValid: Redirect target 
'/apps/opal/loginNode.html' does not start with servlet context path '/dev'

Changing the redirection in FormAuthenticationHandler:413 with this worked for 
me:
AuthUtil.sendRedirect(request, response, request.getContextPath() + loginForm, 
params);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to