This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Get Programming with Java (MEAP only) and have Peggy Fisher on-line!
See this thread for details.
Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Spring 5 antMatcher not working as expected  RSS feed

Ranch Hand
Posts: 1616
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a simple testing authentication set up, but it's allowing any user role to access the "hello" class. I'm using an online example as my learning point and the author didn't get it working correctly either...

Here's the override for configure:


But the URL using the user = demo (and admin role), still gets to the page: localhost:8088/rest/hello

I've tried various combinations of asterisks with the .antMatchers() method above, but I can't get the security to respect only the user role.

To get the password stuff to work at all, I also had to refactor the online example to use a Password encoder.

Thanks in advance,

-- mike

Just the other day, I was thinking ... about this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!