Security Authorities/Roles list comes as empty on anonymous login . Why?
Hello,
I'm a newbie to Spring Security. Here's a problem I ran across:
Within my welcome/login jsp page I'm printing out the current role of the user (anonymous guest) who just got to this page:
<security:authentication property="authorities" var="authorities" />
<ul> <c:forEach items="${authorities}" var="authority">
<li>${authority.authority}</li>
</c:forEach>
</ul>
When I start my browser fresh (i.e. with all the cookies/browsing history cleaned up) the list correctly contains ROLE_GUEST item. However, when I access page for the second (and subsequent) times - the list comes as empty.
Can anyone explain why?
Thank you so much,
Dima