问题描述:

I'm using Spring Security. I need to block the access to Login page if user is authenticated. The following line is giving error.

<intercept-url pattern="/user/**" access="!IS_AUTHENTICATED_FULLY" />

Error is unsupported configuration.

网友答案:

either you can use IS_AUTHENTICATED_ANONYMOUSLY (to allow access only if user is authenticated anonymously), or enable expressions and use IsAuthenticated() like given below

<http use-expressions="true">
    <intercept-url pattern="/user/**"
        access="isAuthenticated()"/>
    ...
  </http>
相关阅读:
Top