Repository navigation
Add OAuth 2 client library for Python - #1
Conversation
| build-backend = "hatchling.build" | ||
|
|
||
| [project] | ||
| name = "mastercard-oauth2-client" |
There was a problem hiding this comment.
Don't forget to book the name mastercard-oauth2-client asap on PyPI (https://pypi.org/project/mastercard-oauth2-client/ returns 404). Once the repo is public, anyone can publish under this name before we do.
There was a problem hiding this comment.
Do you mean we should publish a prerelease to claim the name, or is there another way to reserve it on PyPI?
There was a problem hiding this comment.
Maybe publish and then make the repo public. Or publish soon enough. I've read something the other day about bots stealing package names like that.
Co-authored-by: Jean-Alexis Aufauvre <3964455+jaaufauvre@users.noreply.github.com>
Co-authored-by: Jean-Alexis Aufauvre <3964455+jaaufauvre@users.noreply.github.com>
|
Fix for defect https://mastercard.atlassian.net/browse/G1548-13582 [Python OAuth2 Library] Failed token request is returned as the resource response instead of raising an error. Addressed by cecee4c. |
|
Review comment (offline from Marco): A DPoP challenge from a redirect destination could cause the original request to be sent again. Fix: The handler now verifies that the response belongs to the request it is handling before retrying the request or storing the returned nonce. Tests cover both same-origin and cross-origin redirects. Addressed by 470c6e1. |
Thanks @ShimonaR-MC. |
Summary
Introduces the Mastercard OAuth 2.0 client library for Python, including FAPI 2.0, DPoP, token caching, key management, and integrations for HTTPX, aiohttp, and OpenAPI-generated clients.
Adds opt-in Mastercard sandbox tests for all supported integrations, with manual and scheduled GitHub Actions execution.
See the README for installation, configuration, supported clients, and usage examples.
Jira
Pending Work
Public release and release gates are tracked separately under G1548-11182.
Validation