Category: Database, Data, encryption

In this post, I will show how to secure your spring boot based REST API. It has been more of a trend to secure REST APIs to avoid any unnecessary calls to public APIs.

A user will try to access /cachedemo/v1/companies/ and since APIs are protected, the user will get a response like below: Now we will implement how to protect this API and how to access it when it is protected. Since we want to add authorization for APIs, we will need to know where the user is able to log in and send credentials.

In this class, we will restrict our APIs and also add some whitelisted URLs that we will need access without any authorization token.

Related Articles