mardi 3 mars 2015

Hitting login url after logging in, in spring security


<http use-expressions="true" auto-config="true">

<!-- Restrict URLs based on role -->
<intercept-url pattern="/login" access="isAnonymous()" />
<intercept-url pattern="/register" access="isAnonymous()" />
<intercept-url pattern="/save" access="isAnonymous()" />

<intercept-url pattern="/**" access="isAuthenticated()" />
<form-login login-page="/login" default-target-url="/home" authentication-failure-url="/login" />
</http>


Above code is defined in my security-context.xml, so after successful log in it is taking me to home page, but after logging in, if through address bar I'm hitting the login url again, then it is throwing 403 error page with description Access to the specified resource (Access is denied) has been forbidden.


Please help, what to do?


Aucun commentaire:

Enregistrer un commentaire