>>
>> In the context of a Sling request the API to call would be
>> https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletRequest.html#getUserPrincipal--
>> : a null return value corresponds to the anonymous access.
>>
>
> This does not work for me. I get back
> org.apa
by Sling), so I need
to use some API to do that check.
>
> But maybe you want to share a bit of context on what you aim to achieve?
>
> Kind regards
> Angela
>
>
>
> From: Konrad Windszus
> Sent: Wednesday, April 12, 2023 10:49
>
@jackrabbit.apache.org
Subject: How to check if user is anonymous
EXTERNAL: Use caution when clicking on links or opening attachments.
How do I figure out if a org.apache.jackrabbit.api.security.user.User object is
representing the anonymous user[1] or not.
Unfortunately the interface only has methods isAdmin
The method at
https://github.com/apache/jackrabbit-oak/blob/160d2be57c8e7733466a5bbe9ee88afaa2025c96/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/UserUtil.java#L56
requires to pass the
org.apache.jackrabbit.oak.spi.security.ConfigurationParameters object, so I
How do I figure out if a org.apache.jackrabbit.api.security.user.User object is
representing the anonymous user[1] or not.
Unfortunately the interface only has methods isAdmin and isSystemUser [2]
Any pointers appreciated.
Thanks in advance,
Konrad
[1] -
https://jackrabbit.apache.org/oak/docs/s