pas.plugins.authomatic 1.3.0__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/CHANGELOG.md +12 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/PKG-INFO +29 -3
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/pyproject.toml +3 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/setup.py +4 -2
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/__init__.py +14 -6
- pas_plugins_authomatic-1.4.1/src/pas/plugins/authomatic/logging.py +6 -0
- pas_plugins_authomatic-1.4.1/src/pas/plugins/authomatic/patches/__init__.py +5 -0
- pas_plugins_authomatic-1.4.1/src/pas/plugins/authomatic/patches/authomatic.py +147 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/services/configure.zcml +3 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/PKG-INFO +29 -3
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/SOURCES.txt +3 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/requires.txt +1 -1
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/.coveragerc +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/.editorconfig +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/CONTRIBUTORS.md +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/LICENSE.txt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/MANIFEST.in +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/Makefile +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/README.md +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/docs/authomatic.svg +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/docs/plone-control-panel.png +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/docs/plugin-settings.png +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/requirements.txt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/setup.cfg +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/authomatic.png +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/authomatic.pt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/configure.zcml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/controlpanel.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/browser/view.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/configure.zcml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/integration/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/integration/restapi.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/integration/zope.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/interfaces.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/de/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/es/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/locales/update.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/meta.zcml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/plugin.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/profiles.zcml +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/services/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/services/authomatic.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/services/login.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/setuphandlers.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/testing.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/__init__.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/mocks.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_browser_controlpanel.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_plugin.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_services_authomatic.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_services_login.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_setup.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_setuphandler.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_upgrades.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_useridentities.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/tests/test_useridfactories.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/useridentities.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/useridfactories.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/utils.py +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/dependency_links.txt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/entry_points.txt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/namespace_packages.txt +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/not-zip-safe +0 -0
- {pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas.plugins.authomatic.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.1 (2025-04-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
- Restore compatibility with Plone 6.0.15. Fixes [#97](https://github.com/collective/pas.plugins.authomatic/issues/97). @ale-rt
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## 1.4.0 (2024-12-13)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
- Patch `authomatic.providers.BaseProvider._fetch` to support Python 3.12 @ericof.
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
## 1.3.0 (2024-11-21)
|
|
4
16
|
|
|
5
17
|
- Search users by fullname and email. @alecghica
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pas.plugins.authomatic
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: Provides OAuth2/OpenID login for Plone using Authomatic.
|
|
5
5
|
Home-page: https://github.com/collective/pas.plugins.authomatic
|
|
6
6
|
Author: Jens Klein, Matthias Dollfuss, and Érico Andrei
|
|
@@ -25,11 +25,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.9
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.10
|
|
27
27
|
Classifier: Programming Language :: Python :: 3.11
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
28
29
|
Classifier: Programming Language :: Python
|
|
29
30
|
Requires-Python: >=3.7
|
|
30
31
|
Description-Content-Type: text/markdown
|
|
31
32
|
License-File: LICENSE.txt
|
|
32
|
-
Requires-Dist: authomatic>=1.
|
|
33
|
+
Requires-Dist: authomatic>=1.3.0
|
|
33
34
|
Requires-Dist: Products.CMFPlone>=5.2
|
|
34
35
|
Requires-Dist: plone.restapi
|
|
35
36
|
Requires-Dist: setuptools
|
|
@@ -40,6 +41,19 @@ Requires-Dist: plone.app.testing; extra == "test"
|
|
|
40
41
|
Requires-Dist: plone.restapi[test]; extra == "test"
|
|
41
42
|
Requires-Dist: plone.app.robotframework[debug]; extra == "test"
|
|
42
43
|
Requires-Dist: zest.releaser[recommended]; extra == "test"
|
|
44
|
+
Dynamic: author
|
|
45
|
+
Dynamic: author-email
|
|
46
|
+
Dynamic: classifier
|
|
47
|
+
Dynamic: description
|
|
48
|
+
Dynamic: description-content-type
|
|
49
|
+
Dynamic: home-page
|
|
50
|
+
Dynamic: keywords
|
|
51
|
+
Dynamic: license
|
|
52
|
+
Dynamic: project-url
|
|
53
|
+
Dynamic: provides-extra
|
|
54
|
+
Dynamic: requires-dist
|
|
55
|
+
Dynamic: requires-python
|
|
56
|
+
Dynamic: summary
|
|
43
57
|
|
|
44
58
|
|
|
45
59
|
<div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
|
|
@@ -269,6 +283,18 @@ The project is licensed under the GPLv2.
|
|
|
269
283
|
|
|
270
284
|
# Changelog
|
|
271
285
|
|
|
286
|
+
## 1.4.1 (2025-04-04)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
- Restore compatibility with Plone 6.0.15. Fixes [#97](https://github.com/collective/pas.plugins.authomatic/issues/97). @ale-rt
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
## 1.4.0 (2024-12-13)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
- Patch `authomatic.providers.BaseProvider._fetch` to support Python 3.12 @ericof.
|
|
296
|
+
|
|
297
|
+
|
|
272
298
|
## 1.3.0 (2024-11-21)
|
|
273
299
|
|
|
274
300
|
- Search users by fullname and email. @alecghica
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Installer for the pas.plugins.authomatic package."""
|
|
2
|
+
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
from setuptools import find_packages
|
|
4
5
|
from setuptools import setup
|
|
@@ -11,7 +12,7 @@ long_description = f"""
|
|
|
11
12
|
|
|
12
13
|
setup(
|
|
13
14
|
name="pas.plugins.authomatic",
|
|
14
|
-
version="1.
|
|
15
|
+
version="1.4.1",
|
|
15
16
|
description="Provides OAuth2/OpenID login for Plone using Authomatic.",
|
|
16
17
|
long_description=long_description,
|
|
17
18
|
long_description_content_type="text/markdown",
|
|
@@ -31,6 +32,7 @@ setup(
|
|
|
31
32
|
"Programming Language :: Python :: 3.9",
|
|
32
33
|
"Programming Language :: Python :: 3.10",
|
|
33
34
|
"Programming Language :: Python :: 3.11",
|
|
35
|
+
"Programming Language :: Python :: 3.12",
|
|
34
36
|
"Programming Language :: Python",
|
|
35
37
|
],
|
|
36
38
|
keywords="Python Plone PAS OAuth Authentication",
|
|
@@ -50,7 +52,7 @@ setup(
|
|
|
50
52
|
python_requires=">=3.7",
|
|
51
53
|
zip_safe=False,
|
|
52
54
|
install_requires=[
|
|
53
|
-
"authomatic>=1.
|
|
55
|
+
"authomatic>=1.3.0",
|
|
54
56
|
"Products.CMFPlone>=5.2",
|
|
55
57
|
"plone.restapi",
|
|
56
58
|
"setuptools",
|
{pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/__init__.py
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
from pas.plugins.authomatic.patches import apply_patches
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
PACKAGE_NAME = "pas.plugins.authomatic"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
apply_patches()
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def initialize(context):
|
|
@@ -15,6 +16,13 @@ def initialize(context):
|
|
|
15
16
|
Here, we call the Archetypes machinery to register our content types
|
|
16
17
|
with Zope and the CMF.
|
|
17
18
|
"""
|
|
19
|
+
from AccessControl.Permissions import add_user_folders
|
|
20
|
+
from pas.plugins.authomatic.plugin import AuthomaticPlugin
|
|
21
|
+
from pas.plugins.authomatic.plugin import manage_addAuthomaticPlugin
|
|
22
|
+
from pas.plugins.authomatic.plugin import manage_addAuthomaticPluginForm
|
|
23
|
+
from pas.plugins.authomatic.plugin import tpl_dir
|
|
24
|
+
from Products.PluggableAuthService import registerMultiPlugin
|
|
25
|
+
|
|
18
26
|
registerMultiPlugin(AuthomaticPlugin.meta_type)
|
|
19
27
|
context.registerClass(
|
|
20
28
|
AuthomaticPlugin,
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
from authomatic.exceptions import FetchError
|
|
2
|
+
from authomatic.providers import BaseProvider
|
|
3
|
+
from http import client as http_client
|
|
4
|
+
from pas.plugins.authomatic.logging import logger
|
|
5
|
+
from urllib import parse
|
|
6
|
+
|
|
7
|
+
import authomatic.core
|
|
8
|
+
import ssl
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def patch_base_provider_fetch():
|
|
12
|
+
def _fetch(
|
|
13
|
+
self,
|
|
14
|
+
url,
|
|
15
|
+
method="GET",
|
|
16
|
+
params=None,
|
|
17
|
+
headers=None,
|
|
18
|
+
body="",
|
|
19
|
+
max_redirects=5,
|
|
20
|
+
content_parser=None,
|
|
21
|
+
certificate_file=None,
|
|
22
|
+
ssl_verify=True,
|
|
23
|
+
):
|
|
24
|
+
"""
|
|
25
|
+
Fetches a URL.
|
|
26
|
+
|
|
27
|
+
:param str url:
|
|
28
|
+
The URL to fetch.
|
|
29
|
+
|
|
30
|
+
:param str method:
|
|
31
|
+
HTTP method of the request.
|
|
32
|
+
|
|
33
|
+
:param dict params:
|
|
34
|
+
Dictionary of request parameters.
|
|
35
|
+
|
|
36
|
+
:param dict headers:
|
|
37
|
+
HTTP headers of the request.
|
|
38
|
+
|
|
39
|
+
:param str body:
|
|
40
|
+
Body of ``POST``, ``PUT`` and ``PATCH`` requests.
|
|
41
|
+
|
|
42
|
+
:param int max_redirects:
|
|
43
|
+
Number of maximum HTTP redirects to follow.
|
|
44
|
+
|
|
45
|
+
:param function content_parser:
|
|
46
|
+
A callable to be used to parse the :attr:`.Response.data`
|
|
47
|
+
from :attr:`.Response.content`.
|
|
48
|
+
|
|
49
|
+
:param str certificate_file:
|
|
50
|
+
Optional certificate file to be used for HTTPS connection.
|
|
51
|
+
|
|
52
|
+
:param bool ssl_verify:
|
|
53
|
+
Verify SSL on HTTPS connection.
|
|
54
|
+
"""
|
|
55
|
+
# 'magic' using _kwarg method
|
|
56
|
+
# pylint:disable=no-member
|
|
57
|
+
params = params or {}
|
|
58
|
+
params.update(self.access_params)
|
|
59
|
+
|
|
60
|
+
headers = headers or {}
|
|
61
|
+
headers.update(self.access_headers)
|
|
62
|
+
|
|
63
|
+
url_parsed = parse.urlsplit(url)
|
|
64
|
+
query = parse.urlencode(params)
|
|
65
|
+
|
|
66
|
+
if method in ("POST", "PUT", "PATCH"):
|
|
67
|
+
if not body:
|
|
68
|
+
# Put querystring to body
|
|
69
|
+
body = query
|
|
70
|
+
query = ""
|
|
71
|
+
headers.update({"Content-Type": "application/x-www-form-urlencoded"})
|
|
72
|
+
request_path = parse.urlunsplit(
|
|
73
|
+
("", "", url_parsed.path or "", query or "", "")
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
self._log_param("host", url_parsed.hostname, last=False)
|
|
77
|
+
self._log_param("method", method, last=False)
|
|
78
|
+
self._log_param("body", body, last=False)
|
|
79
|
+
self._log_param("params", params, last=False)
|
|
80
|
+
self._log_param("headers", headers, last=False)
|
|
81
|
+
self._log_param("certificate", certificate_file, last=False)
|
|
82
|
+
self._log_param("SSL verify", ssl_verify, last=True)
|
|
83
|
+
|
|
84
|
+
# Connect
|
|
85
|
+
if url_parsed.scheme.lower() == "https":
|
|
86
|
+
if ssl_verify:
|
|
87
|
+
context = ssl.create_default_context(
|
|
88
|
+
purpose=ssl.Purpose.SERVER_AUTH, cafile=certificate_file
|
|
89
|
+
)
|
|
90
|
+
else:
|
|
91
|
+
context = ssl._create_unverified_context()
|
|
92
|
+
|
|
93
|
+
connection = http_client.HTTPSConnection(
|
|
94
|
+
url_parsed.hostname, port=url_parsed.port, context=context
|
|
95
|
+
)
|
|
96
|
+
else:
|
|
97
|
+
connection = http_client.HTTPConnection(
|
|
98
|
+
url_parsed.hostname, port=url_parsed.port
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
try:
|
|
102
|
+
connection.request(method, request_path, body, headers)
|
|
103
|
+
except Exception as e: # noQA: B902
|
|
104
|
+
raise FetchError(
|
|
105
|
+
"Fetching URL failed", original_message=str(e), url=request_path
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
response = connection.getresponse()
|
|
109
|
+
location = response.getheader("Location")
|
|
110
|
+
|
|
111
|
+
if response.status in (300, 301, 302, 303, 307) and location:
|
|
112
|
+
if location == url:
|
|
113
|
+
raise FetchError(
|
|
114
|
+
"Url redirects to itself!", url=location, status=response.status
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
if max_redirects > 0:
|
|
118
|
+
remaining_redirects = max_redirects - 1
|
|
119
|
+
|
|
120
|
+
self._log_param("Redirecting to", url)
|
|
121
|
+
self._log_param("Remaining redirects", remaining_redirects)
|
|
122
|
+
|
|
123
|
+
# Call this method again.
|
|
124
|
+
response = self._fetch(
|
|
125
|
+
url=location,
|
|
126
|
+
params=params,
|
|
127
|
+
method=method,
|
|
128
|
+
headers=headers,
|
|
129
|
+
max_redirects=remaining_redirects,
|
|
130
|
+
certificate_file=certificate_file,
|
|
131
|
+
ssl_verify=ssl_verify,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
else:
|
|
135
|
+
raise FetchError(
|
|
136
|
+
"Max redirects reached!", url=location, status=response.status
|
|
137
|
+
)
|
|
138
|
+
else:
|
|
139
|
+
self._log_param("Got response")
|
|
140
|
+
self._log_param("url", url, last=False)
|
|
141
|
+
self._log_param("status", response.status, last=False)
|
|
142
|
+
self._log_param("headers", response.getheaders(), last=True)
|
|
143
|
+
|
|
144
|
+
return authomatic.core.Response(response, content_parser)
|
|
145
|
+
|
|
146
|
+
BaseProvider._fetch = _fetch
|
|
147
|
+
logger.info("Patched authomatic.providers.BaseProvider._fetch")
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
factory=".login.Get"
|
|
11
11
|
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
|
12
12
|
permission="zope.Public"
|
|
13
|
+
layer="pas.plugins.authomatic.interfaces.IPasPluginsAuthomaticLayer"
|
|
13
14
|
name="@login"
|
|
14
15
|
/>
|
|
15
16
|
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
factory=".authomatic.Get"
|
|
20
21
|
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
|
21
22
|
permission="zope.Public"
|
|
23
|
+
layer="pas.plugins.authomatic.interfaces.IPasPluginsAuthomaticLayer"
|
|
22
24
|
name="@login-authomatic"
|
|
23
25
|
/>
|
|
24
26
|
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
factory=".authomatic.Post"
|
|
28
30
|
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
|
29
31
|
permission="zope.Public"
|
|
32
|
+
layer="pas.plugins.authomatic.interfaces.IPasPluginsAuthomaticLayer"
|
|
30
33
|
name="@login-authomatic"
|
|
31
34
|
/>
|
|
32
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pas.plugins.authomatic
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: Provides OAuth2/OpenID login for Plone using Authomatic.
|
|
5
5
|
Home-page: https://github.com/collective/pas.plugins.authomatic
|
|
6
6
|
Author: Jens Klein, Matthias Dollfuss, and Érico Andrei
|
|
@@ -25,11 +25,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.9
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.10
|
|
27
27
|
Classifier: Programming Language :: Python :: 3.11
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
28
29
|
Classifier: Programming Language :: Python
|
|
29
30
|
Requires-Python: >=3.7
|
|
30
31
|
Description-Content-Type: text/markdown
|
|
31
32
|
License-File: LICENSE.txt
|
|
32
|
-
Requires-Dist: authomatic>=1.
|
|
33
|
+
Requires-Dist: authomatic>=1.3.0
|
|
33
34
|
Requires-Dist: Products.CMFPlone>=5.2
|
|
34
35
|
Requires-Dist: plone.restapi
|
|
35
36
|
Requires-Dist: setuptools
|
|
@@ -40,6 +41,19 @@ Requires-Dist: plone.app.testing; extra == "test"
|
|
|
40
41
|
Requires-Dist: plone.restapi[test]; extra == "test"
|
|
41
42
|
Requires-Dist: plone.app.robotframework[debug]; extra == "test"
|
|
42
43
|
Requires-Dist: zest.releaser[recommended]; extra == "test"
|
|
44
|
+
Dynamic: author
|
|
45
|
+
Dynamic: author-email
|
|
46
|
+
Dynamic: classifier
|
|
47
|
+
Dynamic: description
|
|
48
|
+
Dynamic: description-content-type
|
|
49
|
+
Dynamic: home-page
|
|
50
|
+
Dynamic: keywords
|
|
51
|
+
Dynamic: license
|
|
52
|
+
Dynamic: project-url
|
|
53
|
+
Dynamic: provides-extra
|
|
54
|
+
Dynamic: requires-dist
|
|
55
|
+
Dynamic: requires-python
|
|
56
|
+
Dynamic: summary
|
|
43
57
|
|
|
44
58
|
|
|
45
59
|
<div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
|
|
@@ -269,6 +283,18 @@ The project is licensed under the GPLv2.
|
|
|
269
283
|
|
|
270
284
|
# Changelog
|
|
271
285
|
|
|
286
|
+
## 1.4.1 (2025-04-04)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
- Restore compatibility with Plone 6.0.15. Fixes [#97](https://github.com/collective/pas.plugins.authomatic/issues/97). @ale-rt
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
## 1.4.0 (2024-12-13)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
- Patch `authomatic.providers.BaseProvider._fetch` to support Python 3.12 @ericof.
|
|
296
|
+
|
|
297
|
+
|
|
272
298
|
## 1.3.0 (2024-11-21)
|
|
273
299
|
|
|
274
300
|
- Search users by fullname and email. @alecghica
|
|
@@ -25,6 +25,7 @@ src/pas/plugins/__init__.py
|
|
|
25
25
|
src/pas/plugins/authomatic/__init__.py
|
|
26
26
|
src/pas/plugins/authomatic/configure.zcml
|
|
27
27
|
src/pas/plugins/authomatic/interfaces.py
|
|
28
|
+
src/pas/plugins/authomatic/logging.py
|
|
28
29
|
src/pas/plugins/authomatic/meta.zcml
|
|
29
30
|
src/pas/plugins/authomatic/plugin.py
|
|
30
31
|
src/pas/plugins/authomatic/profiles.zcml
|
|
@@ -56,6 +57,8 @@ src/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po
|
|
|
56
57
|
src/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po
|
|
57
58
|
src/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po
|
|
58
59
|
src/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po
|
|
60
|
+
src/pas/plugins/authomatic/patches/__init__.py
|
|
61
|
+
src/pas/plugins/authomatic/patches/authomatic.py
|
|
59
62
|
src/pas/plugins/authomatic/profiles/default/browserlayer.xml
|
|
60
63
|
src/pas/plugins/authomatic/profiles/default/controlpanel.xml
|
|
61
64
|
src/pas/plugins/authomatic/profiles/default/metadata.xml
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/meta.zcml
RENAMED
|
File without changes
|
{pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/plugin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/testing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pas_plugins_authomatic-1.3.0 → pas_plugins_authomatic-1.4.1}/src/pas/plugins/authomatic/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|