You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Daniel Platon <dp...@gmail.com> on 2013/06/18 16:56:34 UTC

Sling configuration parameters accessible from service code...

Hi everyone,

Is there a way to find out the "anonymousId" configuration value without
logging in using new GuestCredentials() every time? Is there some sort of
service that reads the configuration params at startup and stores them?

Thank you and have a good day.

__
Dan



--
View this message in context: http://apache-sling.73963.n3.nabble.com/Sling-configuration-parameters-accessible-from-service-code-tp4024596.html
Sent from the Sling - Dev mailing list archive at Nabble.com.

Re: Sling configuration parameters accessible from service code...

Posted by Felix Meschberger <fm...@adobe.com>.
Hi Dan

I have the impression you don't need that information...

If you just want to know whether a request is authenticated or not, you can inspect the HttpServletRequest.getAuthType() method: If this method returns null, the request is not authenticated. Otherwise this is a value provided by the AuthenticationHandler having provided the credentials to authenticate the request.

Regards
Felix

Am 18.06.2013 um 16:56 schrieb Daniel Platon:

> Hi everyone,
> 
> Is there a way to find out the "anonymousId" configuration value without
> logging in using new GuestCredentials() every time? Is there some sort of
> service that reads the configuration params at startup and stores them?
> 
> Thank you and have a good day.
> 
> __
> Dan
> 
> 
> 
> --
> View this message in context: http://apache-sling.73963.n3.nabble.com/Sling-configuration-parameters-accessible-from-service-code-tp4024596.html
> Sent from the Sling - Dev mailing list archive at Nabble.com.