I have a component that should behave differently when a site visitor is logged in and/or has a particular role assigned. Any ideas on how to implement this in a jsp? I've looked at the isUserInRole() method, but that doesn't seem to work.
Any help is greatly appreciated.
Check http://sling.apache.org/site/authentication-actors.html. On the last line of this page there is the statement:
If you want to know whether a request is authenticated or not, you can inspect the result of the HttpServletRequest.getAuthType method: If this method returns null the request is not authenticated.