You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi again! The service I'm building an OAuth client for, Bluesky, uses a protected resource metadata endpoint. That RFC is still just a draft, but it came out of the OAuth working group, and afaik is pretty close to accepted. I'm handling the protected resource endpoint myself, with code below, but eventually it'd be nice if requests_oauth2client supported it natively!
Integrated support for this is definitely on my TODO list.
BTW, you can already do something like this with the well_known_uri helper method:
fromrequests_oauth2clientimportwell_known_uri, oauth2_discovery_document_url, OAuth2Clientresp=util.requests_get(well_known_uri(pds_url, "oauth-protected-resource"))
resp.raise_for_status()
auth_server=resp.json()['authorization_servers'][0]
client=OAuth2Client.from_discovery_endpoint(issuer=auth_server) # using `issuer` kwargs, OAuth2Client will go for an "openid-configuration" well-known uri# orclient=OAuth2Client.from_discovery_endpoint(oauth2_discovery_document_url(auth_server) # or explicitly provide the full url, with another helper method
requests_oauth2client
version: headDescription
Hi again! The service I'm building an OAuth client for, Bluesky, uses a protected resource metadata endpoint. That RFC is still just a draft, but it came out of the OAuth working group, and afaik is pretty close to accepted. I'm handling the protected resource endpoint myself, with code below, but eventually it'd be nice if requests_oauth2client supported it natively!
The text was updated successfully, but these errors were encountered: