Hello Julian,

Thank you for your reply. I've setup a clean Sling launchpad and made sure
anonymous access was allowed (auth.annonymous in Apache Sling
Authentication Service if I'm right).

I've created simple content :
/content/opal/protected/subnode and /content/opal/unprotected/subnode

And then set up this configuration:

Apache Sling Authentication Service
sling.auth.requirements = +/content/opal/protected

Apache Sling Form Based Authentication Handler
form.login.form = /app/opal/loginNode (opal/login)

loginNode has sling:resourceType = opal/login and a corresponding view in
/apps/opal/login/html.jsp

It then worked (i.e. I was redirected to my custom login form) for a few
times but somehow it stopped working. I don't know what I did exactly but
now if I try to access "
http://localhost:8080/content/opal/protected/subnode.json"; the "html.jsp"
is offered for download but not displayed anymore.

I also noticed the properties set above are sometimes reinitialized
mysteriously. And once the system/login form went unaccessible (403 on it I
think, couldn't log in Composum either) and I had to reinstall.

So I don't know if this "fake node" is the right way to go, just to use a
JSP instead of a static HTML file

Best regards,
Guillaume

On Wed, Jan 13, 2016 at 4:59 PM, Julian Sedding <[email protected]> wrote:

> Hello Guillaume
>
> Maybe you cannot render the resource, because the "anonymous" user
> does not have read permissions? If you want to have a resource based
> login page, you need to allow "anonymous" read access.
>
> Hope this help!
>
> Regards
> Julian
>
> On Wed, Jan 13, 2016 at 4:15 PM, Guillaume Lucazeau <[email protected]>
> wrote:
> > Hello,
> >
> > I would like to provide a custom form reusing the form authentication
> > provided by Sling, so I have followed this example:
> > https://github.com/apache/sling/tree/trunk/samples/custom-login-form
> >
> > I works well with a static page, however I would like to reuse the
> > header/footer fragments that I usually include with <sling:include> in my
> > application, to get the Javascript and CSS files.
> >
> > Is it possible to use a JSP there, while keeping the authentication
> > mechanism provided by Sling?
> >
> > I didn't succeed to serve a page based on a resource for the
> authentication
> > page, and didn't find much online.
> >
> > Thank you
> > Guillaume
>

Reply via email to