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.
Files changed (55) hide show
  1. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/PKG-INFO +2 -2
  2. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/__init__.py +1 -1
  3. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/configure.zcml +3 -6
  4. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/login.py +12 -13
  5. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pyproject.toml +2 -2
  6. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/.gitignore +0 -0
  7. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/LICENSE.txt +0 -0
  8. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/README.md +0 -0
  9. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/__init__.py +0 -0
  10. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/__init__.py +0 -0
  11. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/__init__.py +0 -0
  12. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
  13. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/authomatic.png +0 -0
  14. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/authomatic.pt +0 -0
  15. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/configure.zcml +0 -0
  16. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/controlpanel.py +0 -0
  17. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
  18. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
  19. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
  20. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/view.py +0 -0
  21. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/configure.zcml +0 -0
  22. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/__init__.py +0 -0
  23. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/restapi.py +0 -0
  24. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/zope.py +0 -0
  25. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/interfaces.py +0 -0
  26. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/__init__.py +0 -0
  27. {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
  28. {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
  29. {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
  30. {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
  31. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
  32. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +0 -0
  33. {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
  34. {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
  35. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/update.py +0 -0
  36. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/log.py +0 -0
  37. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/meta.zcml +0 -0
  38. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/patches/__init__.py +0 -0
  39. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/patches/authomatic.py +0 -0
  40. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/plugin.py +0 -0
  41. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
  42. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
  43. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
  44. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
  45. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
  46. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
  47. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
  48. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles.zcml +0 -0
  49. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/__init__.py +0 -0
  50. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/authomatic.py +0 -0
  51. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/setuphandlers.py +0 -0
  52. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/testing.py +0 -0
  53. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/useridentities.py +0 -0
  54. {pas.plugins.authomatic-2.0.0b2 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/useridfactories.py +0 -0
  55. {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.0b2
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'
@@ -1,7 +1,7 @@
1
1
  from pas.plugins.authomatic.patches import apply_patches
2
2
 
3
3
 
4
- __version__ = "2.0.0b2"
4
+ __version__ = "2.0.0b3"
5
5
 
6
6
 
7
7
  PACKAGE_NAME = "pas.plugins.authomatic"
@@ -5,12 +5,9 @@
5
5
 
6
6
  <include package="plone.restapi" />
7
7
  <!-- List authentication options -->
8
- <plone:service
9
- method="GET"
10
- factory=".login.Get"
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.restapi.services import Service
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
- class Get(Service):
6
- """List available login options for the site."""
8
+ @adapter(IPloneSiteRoot)
9
+ @implementer(ILoginProviders)
10
+ class AuthomaticLoginProviders:
11
+ def __init__(self, context):
12
+ self.context = context
7
13
 
8
- @staticmethod
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==23.11.0",
103
+ "towncrier",
104
104
  "zpretty",
105
105
  "zest.releaser[recommended]",
106
106
  "zestreleaser.towncrier",