Spring Social: Is user logged in -
i want implement following flow:
- user goes login page "login facebook" button displays there
- user logins facebook account "login facebook" button disappears "logout" button appears
i have implemented want, except displaying of controls depending on user signed in or signed out.
how can on jsp level? variables need put in tag?
thanks
try use authorize tag spring security taglib in conjuction spel expressions:
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <sec:authorize access="isauthenticated()"> logout button goes here </sec:authorize> <sec:authorize access="isanonymous()"> login button goes here </sec:authorize>
Comments
Post a Comment