Spring Security 2.0,获取用户的身份验证状态

时间:2010-07-04 15:32:56

标签: authentication jsp spring-security

我正在使用一个使用Spring安全2.0(不是新版本)的webapp,我们没有Java源代码,但是我们可以访问jsp。

从jsp判断用户是否经过身份验证(任何角色都可以)的最简单方法是什么?

基本上我想根据用户是否登录显示不同的链接。

1 个答案:

答案 0 :(得分:0)

我最终使用spring security taglib,security.tld,我可以在哪里

<authz:authorize ifNotGranted="esp_consumer">
   link1
</authz:authorize>

<authz:authorize ifAllGranted="esp_consumer">
   link2
</authz:authorize>
相关问题