• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring security 4 custom login page does not work

 
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys I was wondering if someone could help me. I am attempting to setup a custom login page using spring security 4. The page loads just fine at /login, however when I click submit with the POST to the default processing url at /login , the login page simply loads again and the success handler is never called.






I have tried disabling csrf, or enabling it with <input type="hidden"
   name="${_csrf.parameterName}"
   value="${_csrf.token}"/>[/code]
But the variables do not resolve to anything.


Can anyone help?

Thanks.
 
Jamie Flynn
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
False Alarm! I was Missing the .permitAll() after .loginPage("/login") which means that every time it did a post to login, the login page showed up!

Hope this helps anyone facing similar issues
 
Marshal
Posts: 8623
623
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sharing your findings. Have a cow.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic