I'm trying to better understand how to make use of OIDC/OAuth in securing a restful API, but I keep getting lost in terminology. Also when I research this question most of the answers are for Single Page Apps, so for purposes of this question assume the API will not be used for an SPA.
Assumptions:
- Customers will access a restful API to interact with <Service>.
- It is expected that customers will create automated scripts, or custom application in their own system to call the API.
- Once setup it is not expected that there will be a real person who can provide credentials every time the API is called.
- <Service> uses a 3rd party IDP to store and manage users.
- 3rd part IDP implements OIDC/Oauth and that is how it should be integrated into <Service>
Questions:
- What OIDC/OAuth flow should be used in this situation?
- What credentials should be provided to the customer? client-id/client-secret or something else?
- What tokens can/should be used to communicate information about the "user"? E.g. Who they are/what they can do.
- How should those tokens be validated?
- Can you point me to any good diagrams/resources that explain this specific use case?
- Am I missing anything important in the workflow?