pas.plugins.authomatic 2.0.0b2__tar.gz → 2.0.0b3__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-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/PKG-INFO +2 -2
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/__init__.py +1 -1
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/configure.zcml +3 -6
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/login.py +12 -13
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pyproject.toml +2 -2
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/.gitignore +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/LICENSE.txt +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/README.md +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/authomatic.png +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/authomatic.pt +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/configure.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/controlpanel.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/view.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/configure.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/restapi.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/zope.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/interfaces.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/de/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/es/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/update.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/log.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/meta.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/patches/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/patches/authomatic.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/plugin.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/authomatic.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/setuphandlers.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/testing.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/useridentities.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/useridfactories.py +0 -0
- {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pas.plugins.authomatic
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0b3
|
|
4
4
|
Summary: Provides OAuth2/OpenID login for Plone using Authomatic.
|
|
5
5
|
Project-URL: Changelog, https://github.com/collective/pas.plugins.authomatic/blob/main/CHANGELOG.md
|
|
6
6
|
Project-URL: Homepage, https://github.com/collective/pas.plugins.authomatic
|
|
@@ -26,7 +26,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.12
|
|
27
27
|
Requires-Python: >=3.11
|
|
28
28
|
Requires-Dist: authomatic>=1.3.0
|
|
29
|
-
Requires-Dist: plone-restapi
|
|
29
|
+
Requires-Dist: plone-restapi>=9.10.0
|
|
30
30
|
Requires-Dist: products-cmfplone>=6.0
|
|
31
31
|
Provides-Extra: test
|
|
32
32
|
Requires-Dist: collective-mockmailhost; extra == 'test'
|
|
@@ -5,12 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
<include package="plone.restapi" />
|
|
7
7
|
<!-- List authentication options -->
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
|
12
|
-
permission="zope.Public"
|
|
13
|
-
name="@login"
|
|
8
|
+
<adapter
|
|
9
|
+
factory=".login.AuthomaticLoginProviders"
|
|
10
|
+
name="pas-plugins-authomatic-providers"
|
|
14
11
|
/>
|
|
15
12
|
|
|
16
13
|
<!-- Authomatic authentication services -->
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
from pas.plugins.authomatic.utils import authomatic_cfg
|
|
2
|
-
from plone.
|
|
2
|
+
from plone.base.interfaces import IPloneSiteRoot
|
|
3
|
+
from plone.restapi.interfaces import ILoginProviders
|
|
4
|
+
from zope.component import adapter
|
|
5
|
+
from zope.interface import implementer
|
|
3
6
|
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
@adapter(IPloneSiteRoot)
|
|
9
|
+
@implementer(ILoginProviders)
|
|
10
|
+
class AuthomaticLoginProviders:
|
|
11
|
+
def __init__(self, context):
|
|
12
|
+
self.context = context
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
def list_plugins() -> list[dict]:
|
|
14
|
+
def get_providers(self) -> list[dict]:
|
|
10
15
|
"""List all configured Authomatic plugins.
|
|
11
16
|
|
|
12
17
|
:returns: List of login options.
|
|
@@ -20,17 +25,11 @@ class Get(Service):
|
|
|
20
25
|
for provider_id, provider in providers.items():
|
|
21
26
|
entry = provider.get("display", {})
|
|
22
27
|
title = entry.get("title", provider_id)
|
|
28
|
+
|
|
23
29
|
plugins.append({
|
|
24
30
|
"id": provider_id,
|
|
25
31
|
"plugin": "authomatic",
|
|
26
32
|
"title": title,
|
|
33
|
+
"url": f"{self.context.absolute_url()}/@login-oidc/{provider_id}",
|
|
27
34
|
})
|
|
28
35
|
return plugins
|
|
29
|
-
|
|
30
|
-
def reply(self) -> dict[str, list[dict]]:
|
|
31
|
-
"""List login options available for the site.
|
|
32
|
-
|
|
33
|
-
:returns: Login options information.
|
|
34
|
-
"""
|
|
35
|
-
providers = self.list_plugins()
|
|
36
|
-
return {"options": providers}
|
|
@@ -38,7 +38,7 @@ classifiers = [
|
|
|
38
38
|
]
|
|
39
39
|
dependencies = [
|
|
40
40
|
"authomatic>=1.3.0",
|
|
41
|
-
"plone.restapi",
|
|
41
|
+
"plone.restapi>=9.10.0",
|
|
42
42
|
"Products.CMFPlone>=6.0",
|
|
43
43
|
]
|
|
44
44
|
|
|
@@ -100,7 +100,7 @@ dependencies = [
|
|
|
100
100
|
"pytest-plone>=0.5.0",
|
|
101
101
|
"pytest",
|
|
102
102
|
"ruff",
|
|
103
|
-
"towncrier
|
|
103
|
+
"towncrier",
|
|
104
104
|
"zpretty",
|
|
105
105
|
"zest.releaser[recommended]",
|
|
106
106
|
"zestreleaser.towncrier",
|
|
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-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/log.py
RENAMED
|
File without changes
|
{pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/meta.zcml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/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
|
{pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/testing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/utils.py
RENAMED
|
File without changes
|