0

I have been using spring boot security oauth to secure the api end points, but i need to allow certain apis to work without authentication others to work only after authentication.

Tried using overriding the configure(httpsecurity) with permitall option url level and all also configure websecurity ignore options, None of them working and irrespective of all the over riding all apis expecting auth token in headers

spring-security-oauth2 spring-security-oauth2-resource-server spring-security-oauth2-jose dependencies are used and resourceserver.jwt.jwk-set-uri of auth2 being used for auth config

springboot version 2.2.4

need a solution where we can seggregate in the security filter which all api should use authentication and how to disable authentication for other apis

  • Does this answer your question? [How to disable spring security for particular url](https://stackoverflow.com/questions/30366405/how-to-disable-spring-security-for-particular-url) – dekkard Nov 20 '22 at 10:23
  • If `permitAll` is set for public routes, you are probably having an issue with CSRF or CORS. We need the headers and content of the HTTP response – ch4mp Nov 20 '22 at 16:33

0 Answers0