nov / openid_connect

OpenID Connect Server & Client Library
MIT License
418 stars 122 forks source link

Add revocation_endpoint to optional attrs found in Discovery #78

Closed john-odonnell closed 2 years ago

john-odonnell commented 2 years ago

Described in RFC 8414.

I'm trying to using the revoke! method in rack-oauth2 to invalidate an OIDC refresh token, but I first need to configure the client with a revocation_endpoint target. It would be convenient if this endpoint was included in the Discovery::Provider::Config::Response object.

I've added revocation_endpoint to the list of optional attributes on the Response class, and added a test case to that end.

john-odonnell commented 2 years ago

I can get the revocation endpoint from the Response object without changes, with:

response = config.discover!(provider_uri)
revocation_uri = response.raw["revocation_endpoint"]

Closing.