Reputation: 8145
I've got service A, an OAuth 2 authentication server, and service B.
Service A has an API and trusts the authentication server.
Service B needs to call service A's API, and to do so it needs to include a client (i.e., non-user-specific) bearer token in the request header.
Aside from client_id
and sub
(which should be the same as client_id
), what information from the bearer token does service A need to use to verify with the authentication server that service B is who it says it is, that the bearer token is valid?
Upvotes: 0
Views: 209
Reputation: 129055
what information from the bearer token does service A need to use to verify with the auth server that service B is who it says it is, that the bearer token is valid?
In addition to sub
, you should validate:
iss
is the server that you trust.Common OAuth servers on the market can typically do these validations for you by using a http endpoint.
Upvotes: 1