If I want to implement a resource server which can take multiple generic authorization servers, how can I make sure my resource server can validate the these access tokens from different servers?
+------+ +----------+
| Auth | | Resource |
+------+ +----------+
\ /
+--------+
| Client |
+--------+
Despite the limited drawing above, say the client goes through the usual authorization code flow to eventually obtain an access token from the auth server and then send it to the resource server to fetch resource which belongs to a particular user which authorizes the client to fetch resource on behalf of the user.
It is not just OAuth authorization server I'm intending to support. I'm actually assuming it's an generic OpenID connect Identity server (IdP). So Auth could be Google's openID, or Microsoft's Identity Provider, or some third party generic OpenID IdP which I may not have control over its implementation.
I'm also not in control of the client, which is some third party server application which want to consume the API from the resource server.
I am trying to implement the resource server. The question is, how do I know which OAuth authorization server (or OpenID connect IdP) provided the access token that I'm suppose to validate? Does OAuth protocol say anything about this?
