Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Spring security 4 custom login page does not work

 
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Sheriff
Posts: 7656
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing your findings. Have a cow.
 
Popeye has his spinach. I have this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic