• 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
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Using Java spring security filters properly

Ranch Hand
Posts: 38
Python Angular Framework Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using Spring security to secure my API with Json Web Token,
And I am authenticating all the APIs that start with "/api/**"

I have a "login" and "sign-up" APIs that don't start with this prefix, so it should pass the security filters.

This is my configuration in "WebSecurityConfigurerAdapter":

And this is the filter I use for validating JWT:

I see that this filter is executed in "login" and "sign-up" even though they don't start with "/api/**" (it is executed twice by the way)
But still, I can log in and sign up successfully

Is this a valid behavior?
If not, what am I missing here?
this llama doesn't want your drama, he just wants this tiny ad for his mama
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!