Skip to content

Add resource to Request._params - #942

Merged
auvipy merged 1 commit into
oauthlib:masterfrom
juannyG:add-rfc8707-resource-to-request
Apr 22, 2026
Merged

auvipy merged 1 commit into
oauthlib:masterfrom
juannyG:add-rfc8707-resource-to-request

Conversation

@juannyG

@juannyG juannyG commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #941

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds RFC 8707 Resource Indicators support by whitelisting the resource parameter in oauthlib.common.Request._params, enabling request.resource attribute access across OAuth2 request parsing.

Changes:

  • Add "resource": None to the Request._params whitelist so it’s exposed via Request.__getattr__.
  • Add unit tests verifying resource is populated from POST body and query string, and defaults to None when absent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
oauthlib/common.py Whitelists the resource parameter so it becomes accessible as request.resource.
tests/test_common.py Adds tests to ensure resource is correctly decoded/exposed from body/query and defaults properly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@auvipy
auvipy merged commit b3f9edf into oauthlib:master Apr 22, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for RFC 8707 resource parameter

3 participants