I am new to Spring Boot and I am going to develop a Card issuance System (Micro-services based) I have two types of users that will request protected resources of the system.
- Admin users (Uses REST API & React App)
- Third party (Microfinance bank that will request card issuance for their users via REST API)-(Server)
I want to use the Oauth2 protocol for these users for authentication and authorizations. I am using microservices-based architecture for the card system in spring boot. I have read the Spring Boot documentation for the Authorization server and I am not able to decide which flow/grant type should be used for these users.
I have seen the redirection of web users to the login page and consent page in documentation and I have REST API clients and I can not redirect the users and show them the consent page for both types of users (I don't want that either). Please help decide if Oauth2 is suitable for this scenario. If so, how can I customize the Authorization server, resource server, and Oauth2 client service to fit my requirements? Please help me with this and let me know if you want more explanation of my requirements. Thanks
I have configured the Authorization server of Spring boot and Resource server and I was able to get token using the client_credentials flow, that flow is intended to use for the server-to-server communication and not for Admin users. What I wanted is to get access_token and refresh_token by REST API client (Admin user and Other Third-party(Bank)). Differentiate these clients based on user types and don't want to use the typical login page and consent page.