forked from pool/python-social-auth-core
- Update to 3.4.0:
- Added - Zoom backend - Changed - Directly use access_token in Azure Tenant backend - Support Apple JWT audience - Update partial session cleanup to remove old token from session too - Fetch user email in Okta integration - Improve Python 3.9 compatibility - Send proxies in request - Improve error handling in Apple backend OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-social-auth-core?expand=0&rev=25
This commit is contained in:
@@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 22 23:02:37 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Update to 3.4.0:
|
||||||
|
- Added
|
||||||
|
- Zoom backend
|
||||||
|
- Changed
|
||||||
|
- Directly use access_token in Azure Tenant backend
|
||||||
|
- Support Apple JWT audience
|
||||||
|
- Update partial session cleanup to remove old token from session
|
||||||
|
too
|
||||||
|
- Fetch user email in Okta integration
|
||||||
|
- Improve Python 3.9 compatibility
|
||||||
|
- Send proxies in request
|
||||||
|
- Improve error handling in Apple backend
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 17 09:06:18 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
Mon Aug 17 09:06:18 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
|
%define modname social-core
|
||||||
Name: python-social-auth-core
|
Name: python-social-auth-core
|
||||||
Version: 3.3.3
|
Version: 3.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python Social Auth Core
|
Summary: Python Social Auth Core
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/python-social-auth/social-core
|
Source: https://github.com/python-social-auth/%{modname}/archive/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/social-auth-core/social-auth-core-%{version}.tar.gz
|
|
||||||
# Missing test data https://github.com/python-social-auth/social-core/pull/351
|
# Missing test data https://github.com/python-social-auth/social-core/pull/351
|
||||||
Source1: https://raw.githubusercontent.com/python-social-auth/social-core/master/social_core/tests/backends/data/saml_config.json
|
Source1: https://raw.githubusercontent.com/python-social-auth/social-core/master/social_core/tests/backends/data/saml_config.json
|
||||||
Patch0: remove-unittest2.patch
|
Patch0: remove-unittest2.patch
|
||||||
@@ -85,7 +85,7 @@ third party services, implement integrations with web frameworks and
|
|||||||
storage solutions.
|
storage solutions.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n social-auth-core-%{version}
|
%autosetup -p1 -n %{modname}-%{version}
|
||||||
|
|
||||||
cp %{SOURCE1} social_core/tests/backends/data/
|
cp %{SOURCE1} social_core/tests/backends/data/
|
||||||
|
|
||||||
|
@@ -34,18 +34,9 @@
|
|||||||
from calendar import timegm
|
from calendar import timegm
|
||||||
+import six
|
+import six
|
||||||
|
|
||||||
|
import six
|
||||||
from jose import jwt
|
from jose import jwt
|
||||||
from jose.jwk import RSAKey
|
@@ -151,7 +152,7 @@ class OpenIdConnectTestMixin(object):
|
||||||
@@ -138,7 +139,7 @@ class OpenIdConnectTestMixin(object):
|
|
||||||
if tamper_message:
|
|
||||||
header, msg, sig = body['id_token'].split('.')
|
|
||||||
id_token['sub'] = '1235'
|
|
||||||
- msg = base64.encodestring(json.dumps(id_token).encode()).decode()
|
|
||||||
+ msg = base64.encodebytes(json.dumps(id_token).encode()).decode()
|
|
||||||
body['id_token'] = '.'.join([header, msg, sig])
|
|
||||||
|
|
||||||
return json.dumps(body)
|
|
||||||
@@ -147,7 +148,7 @@ class OpenIdConnectTestMixin(object):
|
|
||||||
self.access_token_body = self.prepare_access_token_body(
|
self.access_token_body = self.prepare_access_token_body(
|
||||||
**access_token_kwargs
|
**access_token_kwargs
|
||||||
)
|
)
|
||||||
@@ -282,20 +273,9 @@
|
|||||||
self.strategy.storage.is_integrity_error(None)
|
self.strategy.storage.is_integrity_error(None)
|
||||||
|
|
||||||
def test_random_string(self):
|
def test_random_string(self):
|
||||||
--- a/social_core/tests/backends/test_vk.py
|
|
||||||
+++ b/social_core/tests/backends/test_vk.py
|
|
||||||
@@ -21,7 +21,7 @@ class VKOAuth2Test(OAuth2Test):
|
|
||||||
'last_name': 'Дуров',
|
|
||||||
'screen_name': 'durov',
|
|
||||||
'nickname': '',
|
|
||||||
- 'photo': "http:\/\/cs7003.vk.me\/v7003815\/22a1\/xgG9fb-IJ3Y.jpg"
|
|
||||||
+ 'photo': "http:\\/\\/cs7003.vk.me\\/v7003815\\/22a1\\/xgG9fb-IJ3Y.jpg"
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
|
|
||||||
--- a/social_core/tests/models.py
|
--- a/social_core/tests/models.py
|
||||||
+++ b/social_core/tests/models.py
|
+++ b/social_core/tests/models.py
|
||||||
@@ -49,19 +49,19 @@ class User(BaseModel):
|
@@ -51,19 +51,19 @@ class User(BaseModel):
|
||||||
User.cache[self.username] = self
|
User.cache[self.username] = self
|
||||||
|
|
||||||
|
|
||||||
@@ -318,16 +298,7 @@
|
|||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
pass
|
pass
|
||||||
@@ -166,7 +166,7 @@ class TestAssociation(AssociationMixin,
|
@@ -224,7 +224,7 @@ class TestPartial(PartialMixin, BaseMode
|
||||||
if assoc is None:
|
|
||||||
assoc = TestAssociation(server_url=server_url,
|
|
||||||
handle=association.handle)
|
|
||||||
- assoc.secret = base64.encodestring(association.secret)
|
|
||||||
+ assoc.secret = base64.encodebytes(association.secret)
|
|
||||||
assoc.issued = association.issued
|
|
||||||
assoc.lifetime = association.lifetime
|
|
||||||
assoc.assoc_type = association.assoc_type
|
|
||||||
@@ -219,7 +219,7 @@ class TestPartial(PartialMixin, BaseMode
|
|
||||||
|
|
||||||
|
|
||||||
class TestStorage(BaseStorage):
|
class TestStorage(BaseStorage):
|
||||||
@@ -366,15 +337,7 @@
|
|||||||
return user
|
return user
|
||||||
--- a/social_core/utils.py
|
--- a/social_core/utils.py
|
||||||
+++ b/social_core/utils.py
|
+++ b/social_core/utils.py
|
||||||
@@ -2,7 +2,6 @@ import re
|
@@ -18,6 +18,10 @@ from requests.packages.urllib3.poolmanag
|
||||||
import sys
|
|
||||||
import time
|
|
||||||
import unicodedata
|
|
||||||
-import collections
|
|
||||||
import functools
|
|
||||||
import hmac
|
|
||||||
import logging
|
|
||||||
@@ -19,6 +18,10 @@ from requests.packages.urllib3.poolmanag
|
|
||||||
|
|
||||||
from .exceptions import AuthCanceled, AuthForbidden, AuthUnreachableProvider
|
from .exceptions import AuthCanceled, AuthForbidden, AuthUnreachableProvider
|
||||||
|
|
||||||
@@ -385,24 +348,6 @@
|
|||||||
|
|
||||||
SETTING_PREFIX = 'SOCIAL_AUTH'
|
SETTING_PREFIX = 'SOCIAL_AUTH'
|
||||||
|
|
||||||
@@ -111,7 +114,7 @@ def sanitize_redirect(hosts, redirect_to
|
|
||||||
|
|
||||||
def user_is_authenticated(user):
|
|
||||||
if user and hasattr(user, 'is_authenticated'):
|
|
||||||
- if isinstance(user.is_authenticated, collections.Callable):
|
|
||||||
+ if isinstance(user.is_authenticated, Callable):
|
|
||||||
authenticated = user.is_authenticated()
|
|
||||||
else:
|
|
||||||
authenticated = user.is_authenticated
|
|
||||||
@@ -124,7 +127,7 @@ def user_is_authenticated(user):
|
|
||||||
|
|
||||||
def user_is_active(user):
|
|
||||||
if user and hasattr(user, 'is_active'):
|
|
||||||
- if isinstance(user.is_active, collections.Callable):
|
|
||||||
+ if isinstance(user.is_active, Callable):
|
|
||||||
is_active = user.is_active()
|
|
||||||
else:
|
|
||||||
is_active = user.is_active
|
|
||||||
--- a/social_core/tests/actions/actions.py
|
--- a/social_core/tests/actions/actions.py
|
||||||
+++ b/social_core/tests/actions/actions.py
|
+++ b/social_core/tests/actions/actions.py
|
||||||
@@ -8,9 +8,9 @@ from six.moves.urllib_parse import urlpa
|
@@ -8,9 +8,9 @@ from six.moves.urllib_parse import urlpa
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:2f6ce1af8ec2b2cc37b86d647f7d4e4292f091ee556941db34b1e0e2dee77fc0
|
|
||||||
size 189098
|
|
3
social-core-3.4.0.tar.gz
Normal file
3
social-core-3.4.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:06e137cf87a23bd077541523833b29f481081dd7ee143651b758db701032e606
|
||||||
|
size 186742
|
Reference in New Issue
Block a user