I have to call a third party service with a Oauth2 token. I don't need to authenticate/authorize my incoming requests. I have added below jars in my Spring Boot 2 application.
- spring-security-oauth2:2.3.5.RELEASE
- spring-cloud-starter-security:2.1.5.RELEASE
This works fine but the problem is whenever I start my server, it generates a default user password and intercepts my requests. This throws HTTP 401 to all incoming requests. I had to write an adapter to permit all incoming requests. Is there any other way to bypass this. Is there any way to prevent spring security getting triggered for all incoming requests?