0

I'm using Spring Security + CAS in my website and there are some pages present different information in different login status.

For example, link: foo.com/index
anonymous user - common page layout + login elements
authenticated user - customized layout + logout elements

Since Spring Security does not support CAS gateway feature at this moment, is there any workaround to resolve this problem?

Thanks, Wilson

Wilson
  • 223
  • 2
  • 8

2 Answers2

0

If you are using jsps for your view you can use Spring Security's tag library to achieve this (Spring Security Docs - JSP Tag Libraries).

If the user is logged in just customize the login/logout elements and use a different style sheet to change layout.

This discussion may help: http://forum.springsource.org/archive/index.php/t-87737.html

smp7d
  • 4,947
  • 2
  • 26
  • 48
0

Spring Security tag library does not work for this situation. Logged in user will have the anonymous user role when in a non-secured page - so doing something like replacing the login link with logout link is not possible.

See: How to show logged in user details on non-secured JSP page after login via Spring Security and CAS? for a more detailed explanation of the problem.

Community
  • 1
  • 1
Steve
  • 779
  • 2
  • 6
  • 18