Compare commits
11 Commits
3f4224c47b
...
4e862d6276
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e862d6276 | ||
|
|
088b18718d | ||
|
|
5e97c58274 | ||
|
|
c94ec0ee4b | ||
|
|
5cef6e15bc | ||
|
|
28063d5a03 | ||
|
|
6e5395ada9 | ||
|
|
9168526f4d | ||
|
|
81a51383ab | ||
|
|
fb1a6a1490 | ||
|
|
ac1003311e |
117
backport-Ensure-expires_at-is-always-int.patch
Normal file
117
backport-Ensure-expires_at-is-always-int.patch
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
From d4b6699f8ccb608152b764919e0bd3d38a7b171f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Sindri=20Gu=C3=B0mundsson?= <sindrigudmundsson@gmail.com>
|
||||||
|
Date: Mon, 22 Aug 2022 16:32:14 +0000
|
||||||
|
Subject: [PATCH] Ensure expires_at is always int
|
||||||
|
|
||||||
|
As discussed in #745
|
||||||
|
---
|
||||||
|
oauthlib/oauth2/rfc6749/clients/base.py | 4 +--
|
||||||
|
oauthlib/oauth2/rfc6749/parameters.py | 5 +++-
|
||||||
|
tests/oauth2/rfc6749/clients/test_base.py | 33 ++++++++++++++++++++++
|
||||||
|
.../rfc6749/clients/test_service_application.py | 2 +-
|
||||||
|
4 files changed, 40 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py
|
||||||
|
index d5eb0cc..1d12638 100644
|
||||||
|
--- a/oauthlib/oauth2/rfc6749/clients/base.py
|
||||||
|
+++ b/oauthlib/oauth2/rfc6749/clients/base.py
|
||||||
|
@@ -589,11 +589,11 @@ class Client:
|
||||||
|
|
||||||
|
if 'expires_in' in response:
|
||||||
|
self.expires_in = response.get('expires_in')
|
||||||
|
- self._expires_at = time.time() + int(self.expires_in)
|
||||||
|
+ self._expires_at = round(time.time()) + int(self.expires_in)
|
||||||
|
|
||||||
|
if 'expires_at' in response:
|
||||||
|
try:
|
||||||
|
- self._expires_at = int(response.get('expires_at'))
|
||||||
|
+ self._expires_at = round(float(response.get('expires_at')))
|
||||||
|
except:
|
||||||
|
self._expires_at = None
|
||||||
|
|
||||||
|
diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py
|
||||||
|
index 8f6ce2c..0f0f423 100644
|
||||||
|
--- a/oauthlib/oauth2/rfc6749/parameters.py
|
||||||
|
+++ b/oauthlib/oauth2/rfc6749/parameters.py
|
||||||
|
@@ -345,7 +345,7 @@ def parse_implicit_response(uri, state=None, scope=None):
|
||||||
|
params['scope'] = scope_to_list(params['scope'])
|
||||||
|
|
||||||
|
if 'expires_in' in params:
|
||||||
|
- params['expires_at'] = time.time() + int(params['expires_in'])
|
||||||
|
+ params['expires_at'] = round(time.time()) + int(params['expires_in'])
|
||||||
|
|
||||||
|
if state and params.get('state', None) != state:
|
||||||
|
raise ValueError("Mismatching or missing state in params.")
|
||||||
|
@@ -437,6 +437,9 @@ def parse_token_response(body, scope=None):
|
||||||
|
else:
|
||||||
|
params['expires_at'] = time.time() + int(params['expires_in'])
|
||||||
|
|
||||||
|
+ if isinstance(params.get('expires_at'), float):
|
||||||
|
+ params['expires_at'] = round(params['expires_at'])
|
||||||
|
+
|
||||||
|
params = OAuth2Token(params, old_scope=scope)
|
||||||
|
validate_token_parameters(params)
|
||||||
|
return params
|
||||||
|
diff --git a/tests/oauth2/rfc6749/clients/test_base.py b/tests/oauth2/rfc6749/clients/test_base.py
|
||||||
|
index 70a2283..7286b99 100644
|
||||||
|
--- a/tests/oauth2/rfc6749/clients/test_base.py
|
||||||
|
+++ b/tests/oauth2/rfc6749/clients/test_base.py
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import datetime
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from oauthlib import common
|
||||||
|
from oauthlib.oauth2 import Client, InsecureTransportError, TokenExpiredError
|
||||||
|
@@ -353,3 +354,35 @@ class ClientTest(TestCase):
|
||||||
|
code_verifier = client.create_code_verifier(length=128)
|
||||||
|
code_challenge_s256 = client.create_code_challenge(code_verifier=code_verifier, code_challenge_method='S256')
|
||||||
|
self.assertEqual(code_challenge_s256, client.code_challenge)
|
||||||
|
+
|
||||||
|
+ def test_parse_token_response_expires_at_is_int(self):
|
||||||
|
+ expected_expires_at = 1661185149
|
||||||
|
+ token_json = ('{ "access_token":"2YotnFZFEjr1zCsicMWpAA",'
|
||||||
|
+ ' "token_type":"example",'
|
||||||
|
+ ' "expires_at":1661185148.6437678,'
|
||||||
|
+ ' "scope":"/profile",'
|
||||||
|
+ ' "example_parameter":"example_value"}')
|
||||||
|
+
|
||||||
|
+ client = Client(self.client_id)
|
||||||
|
+
|
||||||
|
+ response = client.parse_request_body_response(token_json, scope=["/profile"])
|
||||||
|
+
|
||||||
|
+ self.assertEqual(response['expires_at'], expected_expires_at)
|
||||||
|
+ self.assertEqual(client._expires_at, expected_expires_at)
|
||||||
|
+
|
||||||
|
+ @patch('time.time')
|
||||||
|
+ def test_parse_token_response_generated_expires_at_is_int(self, t):
|
||||||
|
+ t.return_value = 1661185148.6437678
|
||||||
|
+ expected_expires_at = round(t.return_value) + 3600
|
||||||
|
+ token_json = ('{ "access_token":"2YotnFZFEjr1zCsicMWpAA",'
|
||||||
|
+ ' "token_type":"example",'
|
||||||
|
+ ' "expires_in":3600,'
|
||||||
|
+ ' "scope":"/profile",'
|
||||||
|
+ ' "example_parameter":"example_value"}')
|
||||||
|
+
|
||||||
|
+ client = Client(self.client_id)
|
||||||
|
+
|
||||||
|
+ response = client.parse_request_body_response(token_json, scope=["/profile"])
|
||||||
|
+
|
||||||
|
+ self.assertEqual(response['expires_at'], expected_expires_at)
|
||||||
|
+ self.assertEqual(client._expires_at, expected_expires_at)
|
||||||
|
diff --git a/tests/oauth2/rfc6749/clients/test_service_application.py b/tests/oauth2/rfc6749/clients/test_service_application.py
|
||||||
|
index b97d855..84361d8 100644
|
||||||
|
--- a/tests/oauth2/rfc6749/clients/test_service_application.py
|
||||||
|
+++ b/tests/oauth2/rfc6749/clients/test_service_application.py
|
||||||
|
@@ -166,7 +166,7 @@ mfvGGg3xNjTMO7IdrwIDAQAB
|
||||||
|
@patch('time.time')
|
||||||
|
def test_parse_token_response(self, t):
|
||||||
|
t.return_value = time()
|
||||||
|
- self.token['expires_at'] = self.token['expires_in'] + t.return_value
|
||||||
|
+ self.token['expires_at'] = self.token['expires_in'] + round(t.return_value)
|
||||||
|
|
||||||
|
client = ServiceApplicationClient(self.client_id)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.9.3.windows.1
|
||||||
|
|
||||||
26
backport-Update-setup.cfg-to-use-license_files-839.patch
Normal file
26
backport-Update-setup.cfg-to-use-license_files-839.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 541297b344944d13c77f4ea0356b83bb3b381dba Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||||
|
Date: Tue, 18 Oct 2022 09:43:17 +0200
|
||||||
|
Subject: [PATCH] Update setup.cfg to use license_files (#839)
|
||||||
|
|
||||||
|
Fixes the following warning:
|
||||||
|
|
||||||
|
> The license_file parameter is deprecated, use license_files instead.
|
||||||
|
---
|
||||||
|
setup.cfg | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/setup.cfg b/setup.cfg
|
||||||
|
index ca59291..286d6cb 100644
|
||||||
|
--- a/setup.cfg
|
||||||
|
+++ b/setup.cfg
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
[metadata]
|
||||||
|
-license_file = LICENSE
|
||||||
|
+license_files = LICENSE
|
||||||
|
|
||||||
|
[isort]
|
||||||
|
combine_as_imports = true
|
||||||
|
--
|
||||||
|
2.9.3.windows.1
|
||||||
|
|
||||||
25
backport-Use-proper-SPDX-identifier.patch
Normal file
25
backport-Use-proper-SPDX-identifier.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From d63d1aea5d3eb1e2240077096177687f018fc32a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Maximilian Wirtz <maximilian.wirtz@tribe29.com>
|
||||||
|
Date: Fri, 16 Sep 2022 13:28:20 +0200
|
||||||
|
Subject: [PATCH] Use proper SPDX identifier
|
||||||
|
|
||||||
|
---
|
||||||
|
setup.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 0192458..4c435f9 100755
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -32,7 +32,7 @@ setup(
|
||||||
|
maintainer_email='ib.lundgren@gmail.com',
|
||||||
|
url='https://github.com/oauthlib/oauthlib',
|
||||||
|
platforms='any',
|
||||||
|
- license='BSD',
|
||||||
|
+ license='BSD-3-Clause',
|
||||||
|
packages=find_packages(exclude=('docs', 'tests', 'tests.*')),
|
||||||
|
python_requires='>=3.6',
|
||||||
|
extras_require={
|
||||||
|
--
|
||||||
|
2.9.3.windows.1
|
||||||
|
|
||||||
@ -1,519 +0,0 @@
|
|||||||
From: Daniele Tricoli <eriol@debian.org>
|
|
||||||
Date: Wed, 17 Jun 2020 01:58:02 +0200
|
|
||||||
Subject: Use unittest.mock instead of external mock
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Backport of upstream fix made by Michał Górny.
|
|
||||||
|
|
||||||
See https://github.com/oauthlib/oauthlib/commit/d4716eb95e9590bb47381a64cda1d57bad8dd907
|
|
||||||
---
|
|
||||||
tests/oauth1/rfc5849/endpoints/test_access_token.py | 2 +-
|
|
||||||
tests/oauth1/rfc5849/endpoints/test_authorization.py | 2 +-
|
|
||||||
tests/oauth1/rfc5849/endpoints/test_base.py | 2 +-
|
|
||||||
tests/oauth1/rfc5849/endpoints/test_request_token.py | 2 +-
|
|
||||||
tests/oauth1/rfc5849/endpoints/test_resource.py | 2 +-
|
|
||||||
tests/oauth1/rfc5849/endpoints/test_signature_only.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/clients/test_backend_application.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/clients/test_legacy_application.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/clients/test_mobile_application.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/clients/test_service_application.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/clients/test_web_application.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_client_authentication.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_error_responses.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_extra_credentials.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/endpoints/test_scope_handling.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/grant_types/test_authorization_code.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/grant_types/test_client_credentials.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/grant_types/test_implicit.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/grant_types/test_refresh_token.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/test_parameters.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/test_server.py | 2 +-
|
|
||||||
tests/oauth2/rfc6749/test_tokens.py | 2 +-
|
|
||||||
tests/openid/connect/core/endpoints/test_claims_handling.py | 2 +-
|
|
||||||
.../connect/core/endpoints/test_openid_connect_params_handling.py | 2 +-
|
|
||||||
tests/openid/connect/core/endpoints/test_userinfo_endpoint.py | 2 +-
|
|
||||||
tests/openid/connect/core/grant_types/test_authorization_code.py | 2 +-
|
|
||||||
tests/openid/connect/core/grant_types/test_base.py | 2 +-
|
|
||||||
tests/openid/connect/core/grant_types/test_dispatchers.py | 2 +-
|
|
||||||
tests/openid/connect/core/grant_types/test_hybrid.py | 2 +-
|
|
||||||
tests/openid/connect/core/grant_types/test_implicit.py | 2 +-
|
|
||||||
tests/openid/connect/core/test_server.py | 2 +-
|
|
||||||
tests/openid/connect/core/test_tokens.py | 2 +-
|
|
||||||
37 files changed, 37 insertions(+), 37 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_access_token.py b/tests/oauth1/rfc5849/endpoints/test_access_token.py
|
|
||||||
index 3499fdb..bc27831 100644
|
|
||||||
--- a/tests/oauth1/rfc5849/endpoints/test_access_token.py
|
|
||||||
+++ b/tests/oauth1/rfc5849/endpoints/test_access_token.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-from mock import ANY, MagicMock
|
|
||||||
+from unittest.mock import ANY, MagicMock
|
|
||||||
|
|
||||||
from oauthlib.oauth1 import RequestValidator
|
|
||||||
from oauthlib.oauth1.rfc5849 import Client
|
|
||||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_authorization.py b/tests/oauth1/rfc5849/endpoints/test_authorization.py
|
|
||||||
index e9d3604..5cbebb6 100644
|
|
||||||
--- a/tests/oauth1/rfc5849/endpoints/test_authorization.py
|
|
||||||
+++ b/tests/oauth1/rfc5849/endpoints/test_authorization.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-from mock import MagicMock
|
|
||||||
+from unittest.mock import MagicMock
|
|
||||||
|
|
||||||
from oauthlib.oauth1 import RequestValidator
|
|
||||||
from oauthlib.oauth1.rfc5849 import errors
|
|
||||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_base.py b/tests/oauth1/rfc5849/endpoints/test_base.py
|
|
||||||
index 795ddee..24d1ffb 100644
|
|
||||||
--- a/tests/oauth1/rfc5849/endpoints/test_base.py
|
|
||||||
+++ b/tests/oauth1/rfc5849/endpoints/test_base.py
|
|
||||||
@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from re import sub
|
|
||||||
|
|
||||||
-from mock import MagicMock
|
|
||||||
+from unittest.mock import MagicMock
|
|
||||||
|
|
||||||
from oauthlib.common import CaseInsensitiveDict, safe_string_equals
|
|
||||||
from oauthlib.oauth1 import Client, RequestValidator
|
|
||||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_request_token.py b/tests/oauth1/rfc5849/endpoints/test_request_token.py
|
|
||||||
index 5c9ae88..3764528 100644
|
|
||||||
--- a/tests/oauth1/rfc5849/endpoints/test_request_token.py
|
|
||||||
+++ b/tests/oauth1/rfc5849/endpoints/test_request_token.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-from mock import ANY, MagicMock
|
|
||||||
+from unittest.mock import ANY, MagicMock
|
|
||||||
|
|
||||||
from oauthlib.oauth1 import RequestValidator
|
|
||||||
from oauthlib.oauth1.rfc5849 import Client
|
|
||||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_resource.py b/tests/oauth1/rfc5849/endpoints/test_resource.py
|
|
||||||
index b71412a..9fd5422 100644
|
|
||||||
--- a/tests/oauth1/rfc5849/endpoints/test_resource.py
|
|
||||||
+++ b/tests/oauth1/rfc5849/endpoints/test_resource.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-from mock import ANY, MagicMock
|
|
||||||
+from unittest.mock import ANY, MagicMock
|
|
||||||
|
|
||||||
from oauthlib.oauth1 import RequestValidator
|
|
||||||
from oauthlib.oauth1.rfc5849 import Client
|
|
||||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_signature_only.py b/tests/oauth1/rfc5849/endpoints/test_signature_only.py
|
|
||||||
index 1d758b1..4c2c04b 100644
|
|
||||||
--- a/tests/oauth1/rfc5849/endpoints/test_signature_only.py
|
|
||||||
+++ b/tests/oauth1/rfc5849/endpoints/test_signature_only.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-from mock import ANY, MagicMock
|
|
||||||
+from unittest.mock import ANY, MagicMock
|
|
||||||
|
|
||||||
from oauthlib.oauth1 import RequestValidator
|
|
||||||
from oauthlib.oauth1.rfc5849 import Client
|
|
||||||
diff --git a/tests/oauth2/rfc6749/clients/test_backend_application.py b/tests/oauth2/rfc6749/clients/test_backend_application.py
|
|
||||||
index aa2ba2b..0ae92a5 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/clients/test_backend_application.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/clients/test_backend_application.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
-from mock import patch
|
|
||||||
+from unittest.mock import patch
|
|
||||||
|
|
||||||
from oauthlib import signals
|
|
||||||
from oauthlib.oauth2 import BackendApplicationClient
|
|
||||||
diff --git a/tests/oauth2/rfc6749/clients/test_legacy_application.py b/tests/oauth2/rfc6749/clients/test_legacy_application.py
|
|
||||||
index 21af4a3..eeaa990 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/clients/test_legacy_application.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/clients/test_legacy_application.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
-from mock import patch
|
|
||||||
+from unittest.mock import patch
|
|
||||||
|
|
||||||
from oauthlib import signals
|
|
||||||
from oauthlib.oauth2 import LegacyApplicationClient
|
|
||||||
diff --git a/tests/oauth2/rfc6749/clients/test_mobile_application.py b/tests/oauth2/rfc6749/clients/test_mobile_application.py
|
|
||||||
index 622b275..7595ce9 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/clients/test_mobile_application.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/clients/test_mobile_application.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
-from mock import patch
|
|
||||||
+from unittest.mock import patch
|
|
||||||
|
|
||||||
from oauthlib import signals
|
|
||||||
from oauthlib.oauth2 import MobileApplicationClient
|
|
||||||
diff --git a/tests/oauth2/rfc6749/clients/test_service_application.py b/tests/oauth2/rfc6749/clients/test_service_application.py
|
|
||||||
index dc337cf..ceb48f2 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/clients/test_service_application.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/clients/test_service_application.py
|
|
||||||
@@ -5,7 +5,7 @@ import os
|
|
||||||
from time import time
|
|
||||||
|
|
||||||
import jwt
|
|
||||||
-from mock import patch
|
|
||||||
+from unittest.mock import patch
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2 import ServiceApplicationClient
|
|
||||||
diff --git a/tests/oauth2/rfc6749/clients/test_web_application.py b/tests/oauth2/rfc6749/clients/test_web_application.py
|
|
||||||
index 092f93e..eb6af27 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/clients/test_web_application.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/clients/test_web_application.py
|
|
||||||
@@ -5,7 +5,7 @@ import datetime
|
|
||||||
import os
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
-from mock import patch
|
|
||||||
+from unittest.mock import patch
|
|
||||||
|
|
||||||
from oauthlib import common, signals
|
|
||||||
from oauthlib.oauth2 import (BackendApplicationClient, Client,
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_client_authentication.py b/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
|
|
||||||
index 133da59..799f510 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
|
|
||||||
@@ -13,7 +13,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
|
||||||
MobileApplicationServer, RequestValidator,
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
|
|
||||||
index e7c66b6..6cd25b2 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
|
|
||||||
@@ -7,7 +7,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2 import (MobileApplicationServer, RequestValidator,
|
|
||||||
WebApplicationServer)
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_error_responses.py b/tests/oauth2/rfc6749/endpoints/test_error_responses.py
|
|
||||||
index 2479836..8697e32 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_error_responses.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_error_responses.py
|
|
||||||
@@ -4,7 +4,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import urlencode
|
|
||||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py b/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
|
|
||||||
index a12fcd2..5d78d04 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
"""
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
|
||||||
MobileApplicationServer, RequestValidator,
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
|
|
||||||
index ae3deae..f9827ce 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from json import loads
|
|
||||||
|
|
||||||
-from mock import MagicMock
|
|
||||||
+from unittest.mock import MagicMock
|
|
||||||
|
|
||||||
from oauthlib.common import urlencode
|
|
||||||
from oauthlib.oauth2 import RequestValidator, IntrospectEndpoint
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py b/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
|
|
||||||
index e823286..472330c 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
|
|
||||||
@@ -4,7 +4,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
|
||||||
MobileApplicationServer, RequestValidator,
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
|
|
||||||
index 17be3a5..aec5acc 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from json import loads
|
|
||||||
|
|
||||||
-from mock import MagicMock
|
|
||||||
+from unittest.mock import MagicMock
|
|
||||||
|
|
||||||
from oauthlib.common import urlencode
|
|
||||||
from oauthlib.oauth2 import RequestValidator, RevocationEndpoint
|
|
||||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_scope_handling.py b/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
|
|
||||||
index 4f27963..97e00ed 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
|
|
||||||
@@ -7,7 +7,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
|
||||||
MobileApplicationServer, RequestValidator, Server,
|
|
||||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
|
|
||||||
index 2c9db3c..4b45875 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors
|
|
||||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_client_credentials.py b/tests/oauth2/rfc6749/grant_types/test_client_credentials.py
|
|
||||||
index edc6bfe..fbd054f 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/grant_types/test_client_credentials.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/grant_types/test_client_credentials.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749.grant_types import ClientCredentialsGrant
|
|
||||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_implicit.py b/tests/oauth2/rfc6749/grant_types/test_implicit.py
|
|
||||||
index 0c18cab..c4bbeda 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/grant_types/test_implicit.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/grant_types/test_implicit.py
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749.grant_types import ImplicitGrant
|
|
||||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_refresh_token.py b/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
|
|
||||||
index 32a0977..ef64c69 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors
|
|
||||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py b/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py
|
|
||||||
index 82e0524..0373e32 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors
|
|
||||||
diff --git a/tests/oauth2/rfc6749/test_parameters.py b/tests/oauth2/rfc6749/test_parameters.py
|
|
||||||
index 48b7eac..fdbd1df 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/test_parameters.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/test_parameters.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-from mock import patch
|
|
||||||
+from unittest.mock import patch
|
|
||||||
|
|
||||||
from oauthlib import signals
|
|
||||||
from oauthlib.oauth2.rfc6749.errors import *
|
|
||||||
diff --git a/tests/oauth2/rfc6749/test_server.py b/tests/oauth2/rfc6749/test_server.py
|
|
||||||
index 2c6ecff..f966547 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/test_server.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/test_server.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib import common
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors, tokens
|
|
||||||
diff --git a/tests/oauth2/rfc6749/test_tokens.py b/tests/oauth2/rfc6749/test_tokens.py
|
|
||||||
index e6f49b1..219486e 100644
|
|
||||||
--- a/tests/oauth2/rfc6749/test_tokens.py
|
|
||||||
+++ b/tests/oauth2/rfc6749/test_tokens.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749.tokens import (
|
|
||||||
diff --git a/tests/openid/connect/core/endpoints/test_claims_handling.py b/tests/openid/connect/core/endpoints/test_claims_handling.py
|
|
||||||
index 5f39d96..f86a176 100644
|
|
||||||
--- a/tests/openid/connect/core/endpoints/test_claims_handling.py
|
|
||||||
+++ b/tests/openid/connect/core/endpoints/test_claims_handling.py
|
|
||||||
@@ -8,7 +8,7 @@ The claims parameter is an optional query param for the Authorization Request en
|
|
||||||
"""
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.openid import RequestValidator
|
|
||||||
from oauthlib.openid.connect.core.endpoints.pre_configured import Server
|
|
||||||
diff --git a/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py b/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
|
|
||||||
index 517239a..aaedbc2 100644
|
|
||||||
--- a/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
|
|
||||||
+++ b/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2 import InvalidRequestError
|
|
||||||
from oauthlib.oauth2.rfc6749.endpoints.authorization import \
|
|
||||||
diff --git a/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py b/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py
|
|
||||||
index 4593d79..ff7986b 100644
|
|
||||||
--- a/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py
|
|
||||||
+++ b/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
import json
|
|
||||||
|
|
||||||
from oauthlib.openid import RequestValidator
|
|
||||||
diff --git a/tests/openid/connect/core/grant_types/test_authorization_code.py b/tests/openid/connect/core/grant_types/test_authorization_code.py
|
|
||||||
index b721a19..06b1340 100644
|
|
||||||
--- a/tests/openid/connect/core/grant_types/test_authorization_code.py
|
|
||||||
+++ b/tests/openid/connect/core/grant_types/test_authorization_code.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749.tokens import BearerToken
|
|
||||||
diff --git a/tests/openid/connect/core/grant_types/test_base.py b/tests/openid/connect/core/grant_types/test_base.py
|
|
||||||
index d506b7e..786b24b 100644
|
|
||||||
--- a/tests/openid/connect/core/grant_types/test_base.py
|
|
||||||
+++ b/tests/openid/connect/core/grant_types/test_base.py
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
import time
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
diff --git a/tests/openid/connect/core/grant_types/test_dispatchers.py b/tests/openid/connect/core/grant_types/test_dispatchers.py
|
|
||||||
index 9e45d65..c746e25 100644
|
|
||||||
--- a/tests/openid/connect/core/grant_types/test_dispatchers.py
|
|
||||||
+++ b/tests/openid/connect/core/grant_types/test_dispatchers.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
|
|
||||||
diff --git a/tests/openid/connect/core/grant_types/test_hybrid.py b/tests/openid/connect/core/grant_types/test_hybrid.py
|
|
||||||
index 0aa0add..336c9f2 100644
|
|
||||||
--- a/tests/openid/connect/core/grant_types/test_hybrid.py
|
|
||||||
+++ b/tests/openid/connect/core/grant_types/test_hybrid.py
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors
|
|
||||||
from oauthlib.oauth2.rfc6749.tokens import BearerToken
|
|
||||||
diff --git a/tests/openid/connect/core/grant_types/test_implicit.py b/tests/openid/connect/core/grant_types/test_implicit.py
|
|
||||||
index 1ee805c..c1aadaf 100644
|
|
||||||
--- a/tests/openid/connect/core/grant_types/test_implicit.py
|
|
||||||
+++ b/tests/openid/connect/core/grant_types/test_implicit.py
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.common import Request
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors
|
|
||||||
diff --git a/tests/openid/connect/core/test_server.py b/tests/openid/connect/core/test_server.py
|
|
||||||
index 756c9d0..87b3a9e 100644
|
|
||||||
--- a/tests/openid/connect/core/test_server.py
|
|
||||||
+++ b/tests/openid/connect/core/test_server.py
|
|
||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.oauth2.rfc6749 import errors
|
|
||||||
from oauthlib.oauth2.rfc6749.endpoints.authorization import AuthorizationEndpoint
|
|
||||||
diff --git a/tests/openid/connect/core/test_tokens.py b/tests/openid/connect/core/test_tokens.py
|
|
||||||
index fde89d6..7dc7433 100644
|
|
||||||
--- a/tests/openid/connect/core/test_tokens.py
|
|
||||||
+++ b/tests/openid/connect/core/test_tokens.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+from unittest import mock
|
|
||||||
|
|
||||||
from oauthlib.openid.connect.core.tokens import JWTToken
|
|
||||||
|
|
||||||
BIN
oauthlib-3.2.2.tar.gz
Normal file
BIN
oauthlib-3.2.2.tar.gz
Normal file
Binary file not shown.
@ -1,36 +1,64 @@
|
|||||||
%global modname oauthlib
|
%global _empty_manifest_terminate_build 0
|
||||||
Name: python-oauthlib
|
Name: python-oauthlib
|
||||||
Version: 3.1.1
|
Version: 3.2.2
|
||||||
Release: 2
|
Release: 2
|
||||||
Summary: Python Framework for OAuth1 & OAuth2
|
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/oauthlib/oauthlib
|
URL: https://github.com/oauthlib/oauthlib
|
||||||
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}.tar.gz
|
Source0: https://github.com/oauthlib/oauthlib/archive/refs/tags/v%{version}.tar.gz#/oauthlib-%{version}.tar.gz
|
||||||
|
Patch0: backport-Update-setup.cfg-to-use-license_files-839.patch
|
||||||
|
Patch1: backport-Ensure-expires_at-is-always-int.patch
|
||||||
|
Patch2: backport-Use-proper-SPDX-identifier.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||||
without assuming a specific HTTP request object or web framework. Use
|
without assuming a specific HTTP request object or web framework. Use
|
||||||
it to graft OAuth client support onto your favorite HTTP library, or
|
it to graft OAuth client support onto your favorite HTTP library, or
|
||||||
provide support onto your favourite web framework. If you're a
|
provide support onto your favourite web framework. If you're a
|
||||||
maintainer of such a library, write a thin veneer on top of OAuthLib
|
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||||
and get OAuth support for very little effort.
|
and get OAuth support for very little effort.
|
||||||
|
|
||||||
%package -n python3-oauthlib
|
%package -n python3-oauthlib
|
||||||
Summary: Python3 package for oauthlib
|
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
Provides: python-oauthlib
|
||||||
BuildRequires: python3-devel python3-setuptools python3-mock
|
# Base build requires
|
||||||
BuildRequires: python3-blinker python3-jwt python3-cryptography
|
BuildRequires: python3-devel
|
||||||
Requires: python3-jwt python3-cryptography
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-pbr
|
||||||
|
BuildRequires: python3-pip
|
||||||
|
BuildRequires: python3-wheel
|
||||||
|
# General requires
|
||||||
|
BuildRequires: python3-cryptography
|
||||||
|
BuildRequires: python3-blinker
|
||||||
|
BuildRequires: python3-cryptography
|
||||||
|
BuildRequires: python3-jwt
|
||||||
|
# General requires
|
||||||
|
Requires: python3-cryptography
|
||||||
|
Requires: python3-blinker
|
||||||
|
Requires: python3-cryptography
|
||||||
|
Requires: python3-jwt
|
||||||
%description -n python3-oauthlib
|
%description -n python3-oauthlib
|
||||||
Python3 package for oauthlib
|
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||||
|
without assuming a specific HTTP request object or web framework. Use
|
||||||
|
it to graft OAuth client support onto your favorite HTTP library, or
|
||||||
|
provide support onto your favourite web framework. If you're a
|
||||||
|
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||||
|
and get OAuth support for very little effort.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
|
||||||
|
Provides: python3-oauthlib-doc
|
||||||
|
%description help
|
||||||
|
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||||
|
without assuming a specific HTTP request object or web framework. Use
|
||||||
|
it to graft OAuth client support onto your favorite HTTP library, or
|
||||||
|
provide support onto your favourite web framework. If you're a
|
||||||
|
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||||
|
and get OAuth support for very little effort.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n oauthlib-%{version} -p1
|
%autosetup -n oauthlib-%{version} -p1
|
||||||
sed -i "s/'unittest2', //" setup.py
|
|
||||||
rm -rf %{modname}.egg-info
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -38,18 +66,62 @@ rm -rf %{modname}.egg-info
|
|||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
|
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
||||||
|
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
||||||
|
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
||||||
|
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
|
||||||
|
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
|
||||||
|
pushd %{buildroot}
|
||||||
|
if [ -d usr/lib ]; then
|
||||||
|
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
||||||
|
fi
|
||||||
|
if [ -d usr/lib64 ]; then
|
||||||
|
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
||||||
|
fi
|
||||||
|
if [ -d usr/bin ]; then
|
||||||
|
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
||||||
|
fi
|
||||||
|
if [ -d usr/sbin ]; then
|
||||||
|
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
|
||||||
|
fi
|
||||||
|
touch doclist.lst
|
||||||
|
if [ -d usr/share/man ]; then
|
||||||
|
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
mv %{buildroot}/filelist.lst .
|
||||||
|
mv %{buildroot}/doclist.lst .
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
|
|
||||||
%files -n python3-oauthlib
|
%files -n python3-oauthlib -f filelist.lst
|
||||||
%defattr(-,root,root)
|
%dir %{python3_sitelib}/*
|
||||||
%doc README.rst
|
|
||||||
%license LICENSE
|
|
||||||
%{python3_sitelib}/oauthlib/*
|
|
||||||
%{python3_sitelib}/oauthlib-%{version}*
|
|
||||||
|
|
||||||
|
%files help -f doclist.lst
|
||||||
|
%{_docdir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri may 17 2024 wuzhaomin <wuzhaomin@kylinos.cn> - 3.2.2-2
|
||||||
|
- Update setup.cfg to use license_files
|
||||||
|
- Ensure expires_at is always int
|
||||||
|
- Use proper SPDX identifier
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Zhipeng Xie <xiezhipeng1@huawei.com> - 3.2.2-1
|
||||||
|
- Type: requirement
|
||||||
|
- CVE: NA
|
||||||
|
- SUG: NA
|
||||||
|
- DESC: update to 3.2.2
|
||||||
|
|
||||||
|
* Mon Sep 26 2022 zhuofeng<zhuofeng2@huawei.com> - 3.2.0-2
|
||||||
|
- Type:CVE
|
||||||
|
- CVE:CVE-2022-36087
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix CVE-2022-36087
|
||||||
|
|
||||||
|
* Tue Jul 05 2022 OpenStack_SIG <openstack@openeuler.org> - 3.2.0-1
|
||||||
|
- Upgrade package python3-oauthlib to version 3.2.0
|
||||||
|
|
||||||
* Wed May 25 2022 renhongxun <renhongxun@h-partners.com> 3.1.1-2
|
* Wed May 25 2022 renhongxun <renhongxun@h-partners.com> 3.1.1-2
|
||||||
- Type: requirement
|
- Type: requirement
|
||||||
- ID: NA
|
- ID: NA
|
||||||
|
|||||||
BIN
v3.1.1.tar.gz
BIN
v3.1.1.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user