• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Java spring security filters properly

 
Ranch Hand
Posts: 41
Python Angular Framework Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?
reply
    Bookmark Topic Watch Topic
  • New Topic