This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Login Form in Spring Security

 
Soheil Tayari
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem with Spring Security custom login form. I think I'm following the API example but the login just don't work. Here's my simple login page (I'm using Struts2):



And here is my application context:


Once I hit the submit the page just gets reloaded. I tried this even without Struts2 tags and with plain HTML. I don't know what I'm doing wrong here.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you are securing your login page. So you have to be logged in to get to the login page.


<intercept-url pattern="/SpringLogin" requires-channel="https" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<form-login login-page="/SpringLogin"/> (It's a Struts2 action which brings up the login form above)

Basically the "IS_AUTHENTICATED_ANONYMOUSLY" means they have to be logged in.

Mark
 
Soheil Tayari
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Spritzler wrote:It looks like you are securing your login page. So you have to be logged in to get to the login page.


<intercept-url pattern="/SpringLogin" requires-channel="https" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<form-login login-page="/SpringLogin"/> (It's a Struts2 action which brings up the login form above)

Basically the "IS_AUTHENTICATED_ANONYMOUSLY" means they have to be logged in.

Mark


Thank you Mark. You're right I set the filters to "none" and it worked. But How can I achieve the secure channel for that URL?
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Won't just

<intercept-url pattern="/SpringLogin" requires-channel="https" filters="none/>

work?

Mark">
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic