oauthoauth-2.0

How to validate an OAuth 2.0 access token for a resource server?


When a client asks a resource server to get a protected resource with an OAuth 2.0 access token, how does this server validate the token? The OAuth 2.0 refresh token protocol?


Solution

  • Update Nov. 2015: As per Hans Z. below - this is now indeed defined as part of RFC 7662.

    Original Answer: The OAuth 2.0 spec (RFC 6749) doesn't clearly define the interaction between a Resource Server (RS) and Authorization Server (AS) for access token (AT) validation. It really depends on the AS's token format/strategy - some tokens are self-contained (like JSON Web Tokens) while others may be similar to a session cookie in that they just reference information held server side back at the AS.

    There has been some discussion in the OAuth Working Group about creating a standard way for an RS to communicate with the AS for AT validation. My company (Ping Identity) has come up with one such approach for our commercial OAuth AS (PingFederate): https://docs.pingidentity.com/pingfederate/latest/developers_reference_guide/pf_oauth_grant_type_param.html#access-token-validation-grant-type. It uses REST based interaction for this that is very complementary to OAuth 2.0.