You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

auth0-python

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0-python - pypi Package Compare versions

Comparing version
4.6.1
to
4.7.0
+30
auth0/authentication/pushed_authorization_requests.py
from typing import Any
from .base import AuthenticationBase
class PushedAuthorizationRequests(AuthenticationBase):
"""Pushed Authorization Request (PAR) endpoint"""
def pushed_authorization_request(
self, response_type: str, redirect_uri: str, **kwargs
) -> Any:
"""Send a Pushed Authorization Request (PAR).
Args:
response_type (str): Indicates to Auth0 which OAuth 2.0 flow you want to perform.
redirect_uri (str): The URL to which Auth0 will redirect the browser after authorization has been granted
by the user.
**kwargs: Other fields to send along with the PAR.
See: https://www.rfc-editor.org/rfc/rfc9126.html
"""
return self.authenticated_post(
f"{self.protocol}://{self.domain}/oauth/par",
data={
"client_id": self.client_id,
"response_type": response_type,
"redirect_uri": redirect_uri,
**kwargs,
},
)
import unittest
from unittest import mock
from ...authentication.pushed_authorization_requests import PushedAuthorizationRequests
class TestRevokeToken(unittest.TestCase):
@mock.patch("auth0.rest.RestClient.post")
def test_par(self, mock_post):
a = PushedAuthorizationRequests("my.domain.com", "cid", client_secret="sh!")
a.pushed_authorization_request(
response_type="code", redirect_uri="https://example.com/callback"
)
args, kwargs = mock_post.call_args
self.assertEqual(args[0], "https://my.domain.com/oauth/par")
self.assertEqual(
kwargs["data"],
{
"client_id": "cid",
"client_secret": "sh!",
"response_type": "code",
"redirect_uri": "https://example.com/callback",
},
)
@mock.patch("auth0.rest.RestClient.post")
def test_par_custom_params(self, mock_post):
a = PushedAuthorizationRequests("my.domain.com", "cid", client_secret="sh!")
a.pushed_authorization_request(
response_type="code", redirect_uri="https://example.com/callback", foo="bar"
)
args, kwargs = mock_post.call_args
self.assertEqual(args[0], "https://my.domain.com/oauth/par")
self.assertEqual(
kwargs["data"],
{
"client_id": "cid",
"client_secret": "sh!",
"response_type": "code",
"redirect_uri": "https://example.com/callback",
"foo": "bar",
},
)
+1
-1
# This value is updated by `poetry_dynamic_versioning` during build time from the latest git tag
__version__ = "4.6.1"
__version__ = "4.7.0"

@@ -4,0 +4,0 @@ from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError

Metadata-Version: 2.1
Name: auth0-python
Version: 4.6.1
Version: 4.7.0
Summary:

@@ -9,6 +9,5 @@ Home-page: https://auth0.com

Author-email: support@auth0.com
Requires-Python: >=3.7
Requires-Python: >=3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8

@@ -161,8 +160,8 @@ Classifier: Programming Language :: Python :: 3.9

| SDK Version | Python Version | Support Ends |
|-------------| -------------- | ------------ |
| 4.x | 3.11 | Oct 2027 |
|-------------|----------------|--------------|
| 4.x | 3.12 | Oct 2028 |
| | 3.11 | Oct 2027 |
| | 3.10 | Oct 2026 |
| | 3.9 | Oct 2025 |
| | 3.8 | Oct 2024 |
| | 3.7 | Oct 2023 |

@@ -174,3 +173,4 @@ > As `pip` [reliably avoids](https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata) installing package updates that target incompatible Python versions, we may opt to remove support for [end-of-life](https://en.wikipedia.org/wiki/CPython#Version_history) Python versions during minor SDK updates. These are not considered breaking changes by this SDK.

| Python Version | Last SDK Version Supporting |
| -------------- |-----------------------------|
|----------------|-----------------------------|
| <= 3.7 | 4.6.1 |
| >= 2.0, <= 3.6 | 3.x |

@@ -177,0 +177,0 @@

@@ -7,3 +7,3 @@ [build-system]

name = "auth0-python"
version = "4.6.1" # This is replaced by dynamic versioning
version = "4.7.0" # This is replaced by dynamic versioning
description = ""

@@ -30,3 +30,3 @@ authors = ["Auth0 <support@auth0.com>"]

[tool.poetry.dependencies]
python = ">=3.7"
python = ">=3.8"
aiohttp = "^3.8.5"

@@ -45,4 +45,4 @@ cryptography = "^41.0.5" # pyjwt has a weak dependency on cryptography

pytest-aiohttp = "^1.0.4"
pytest-asyncio = "^0.21.1"
pytest-asyncio = ">=0.21.1,<0.24.0"
pytest-cov = "^4.1.0"
responses = "^0.23.3"
responses = ">=0.23.3,<0.25.0"

@@ -135,8 +135,8 @@ ![Auth0 SDK for Python](https://cdn.auth0.com/website/sdks/banners/auth0-python-banner.png)

| SDK Version | Python Version | Support Ends |
|-------------| -------------- | ------------ |
| 4.x | 3.11 | Oct 2027 |
|-------------|----------------|--------------|
| 4.x | 3.12 | Oct 2028 |
| | 3.11 | Oct 2027 |
| | 3.10 | Oct 2026 |
| | 3.9 | Oct 2025 |
| | 3.8 | Oct 2024 |
| | 3.7 | Oct 2023 |

@@ -148,3 +148,4 @@ > As `pip` [reliably avoids](https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata) installing package updates that target incompatible Python versions, we may opt to remove support for [end-of-life](https://en.wikipedia.org/wiki/CPython#Version_history) Python versions during minor SDK updates. These are not considered breaking changes by this SDK.

| Python Version | Last SDK Version Supporting |
| -------------- |-----------------------------|
|----------------|-----------------------------|
| <= 3.7 | 4.6.1 |
| >= 2.0, <= 3.6 | 3.x |

@@ -151,0 +152,0 @@