Hello,
actually I am facing the authentication of an application.
I want to use the handleSecurity()-Method of the class SlingAuthenticator.
This works fine.
I have different paths. Some should be accessed by anonymous, others
not. So I thought I use the sling.auth.requirements property to do this.
It works fine, if I add the paths in the configuration in the web
management console.
But it is not so comfortable, because the user has to interact. So I
read about the possibility to add this paths with an OSGi service.
I created a service, that implements the AuthenticationHandler and
contains the property
@scr.property nameRef="AuthenticationHandler.PATH_PROPERTY" value="/bla"
The bind()-Method in the ServiceTracker of SlingAuthenticator is called
and the path is inserted into authHandlerCache.
When I try to login as anonymous to /bla the path from my service gets
not checked in the method isAnonAllowed(), that tests the paths
anonymous can access , because it is not in the variable authRequiredCache.
How can I add a path to the SlingAuthenticator via OSGi service, that it
is checked in the anonymous login process?
Could it be an missing insert to the authRequiredCache?
Thanks for your help.
Thorsten