I'm using the spring security plugin in a Grails app. There are two reasons why the login page gets displayed
- The user navigated to it directly
- The user tried to access a page that is only available to logged-in users
In the case of (2) only, I want to display a message like "you attempted to access a page that requires login", but in the GSP code of the login page I can't find a way to distinguish between (1) and (2), is this possible?