pas.plugins.authomatic 2.0.0rc3__tar.gz → 3.0.0__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 (129) hide show
  1. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/.gitignore +2 -2
  2. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/CHANGELOG.md +53 -0
  3. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/PKG-INFO +79 -48
  4. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/README.md +69 -37
  5. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/pyproject.toml +32 -11
  6. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/__init__.py +9 -2
  7. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/_types.py +146 -0
  8. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/configure.zcml +1 -1
  9. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/controlpanel.py +10 -8
  10. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/view.py +54 -50
  11. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/config.py +78 -0
  12. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/configure.zcml +27 -0
  13. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/dependencies.zcml +10 -0
  14. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/integration/restapi.py +19 -15
  15. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/integration/zope.py +16 -12
  16. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/interfaces.py +65 -0
  17. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/patches/__init__.py +8 -0
  18. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/patches/authomatic.py +2 -2
  19. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/plugin.py +48 -32
  20. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/services/authomatic.py +28 -26
  21. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/services/configure.zcml +2 -2
  22. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/services/login.py +23 -0
  23. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/setuphandlers.py +15 -8
  24. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridentities.py +129 -0
  25. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/__init__.py +32 -0
  26. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/base.py +23 -0
  27. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/configure.zcml +18 -0
  28. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/userid.py +18 -0
  29. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/username.py +18 -0
  30. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/username_userid.py +20 -0
  31. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/useridfactories/uuid_.py +23 -0
  32. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/utils/__init__.py +16 -0
  33. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/utils/content.py +8 -0
  34. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/utils/exportimport.py +108 -0
  35. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/utils/plugin.py +18 -0
  36. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/utils/request.py +20 -0
  37. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/utils/settings.py +66 -0
  38. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/vocabularies/__init__.py +0 -0
  39. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/vocabularies/configure.zcml +11 -0
  40. pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/vocabularies/userid.py +17 -0
  41. pas_plugins_authomatic-3.0.0/tests/__init__.py +0 -0
  42. pas_plugins_authomatic-3.0.0/tests/browser/__init__.py +0 -0
  43. pas_plugins_authomatic-3.0.0/tests/browser/test_view.py +170 -0
  44. pas_plugins_authomatic-3.0.0/tests/functional/__init__.py +0 -0
  45. pas_plugins_authomatic-3.0.0/tests/functional/conftest.py +0 -0
  46. pas_plugins_authomatic-3.0.0/tests/integration/__init__.py +0 -0
  47. pas_plugins_authomatic-3.0.0/tests/integration/test_restapi.py +50 -0
  48. pas_plugins_authomatic-3.0.0/tests/integration/test_zope.py +47 -0
  49. pas_plugins_authomatic-3.0.0/tests/plugin/__init__.py +0 -0
  50. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/plugin/test_useridentities.py +26 -0
  51. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/plugin/test_useridfactories.py +1 -1
  52. pas_plugins_authomatic-3.0.0/tests/services/__init__.py +0 -0
  53. pas_plugins_authomatic-3.0.0/tests/services/conftest.py +11 -0
  54. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/services/test_services_authomatic.py +2 -2
  55. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/services/test_services_login.py +2 -2
  56. pas_plugins_authomatic-3.0.0/tests/setup/__init__.py +0 -0
  57. pas_plugins_authomatic-3.0.0/tests/test_config.py +25 -0
  58. pas_plugins_authomatic-3.0.0/tests/useridfactories/__init__.py +0 -0
  59. pas_plugins_authomatic-3.0.0/tests/useridfactories/conftest.py +68 -0
  60. pas_plugins_authomatic-3.0.0/tests/useridfactories/test_factory_provider_id.py +29 -0
  61. pas_plugins_authomatic-3.0.0/tests/useridfactories/test_factory_username.py +29 -0
  62. pas_plugins_authomatic-3.0.0/tests/useridfactories/test_factory_username_userid.py +34 -0
  63. pas_plugins_authomatic-3.0.0/tests/useridfactories/test_factory_uuid4.py +28 -0
  64. pas_plugins_authomatic-3.0.0/tests/useridfactories/test_new_userid.py +40 -0
  65. pas_plugins_authomatic-3.0.0/tests/utils/__init__.py +0 -0
  66. pas_plugins_authomatic-3.0.0/tests/utils/test_content.py +16 -0
  67. pas_plugins_authomatic-3.0.0/tests/utils/test_exportimport.py +75 -0
  68. pas_plugins_authomatic-3.0.0/tests/utils/test_plugin.py +16 -0
  69. pas_plugins_authomatic-3.0.0/tests/utils/test_request.py +33 -0
  70. pas_plugins_authomatic-3.0.0/tests/utils/test_settings.py +83 -0
  71. pas_plugins_authomatic-3.0.0/tests/vocabulary/__init__.py +0 -0
  72. pas_plugins_authomatic-3.0.0/tests/vocabulary/test_userid_vocabulary.py +32 -0
  73. pas_plugins_authomatic-2.0.0rc3/src/pas/__init__.py +0 -1
  74. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/__init__.py +0 -1
  75. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/configure.zcml +0 -48
  76. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/interfaces.py +0 -145
  77. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/log.py +0 -6
  78. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/patches/__init__.py +0 -5
  79. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/services/login.py +0 -35
  80. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/useridentities.py +0 -83
  81. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/useridfactories.py +0 -57
  82. pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/utils.py +0 -50
  83. pas_plugins_authomatic-2.0.0rc3/tests/services/conftest.py +0 -31
  84. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/CONTRIBUTORS.md +0 -0
  85. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/LICENSE.txt +0 -0
  86. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/dependabot.yml +0 -0
  87. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/docs/authomatic.svg +0 -0
  88. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/docs/plone-control-panel.png +0 -0
  89. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/docs/plugin-settings.png +0 -0
  90. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/instance.yaml +0 -0
  91. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/__init__.py +0 -0
  92. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
  93. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/authomatic.png +0 -0
  94. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/authomatic.pt +0 -0
  95. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
  96. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
  97. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
  98. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/integration/__init__.py +0 -0
  99. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/__init__.py +0 -0
  100. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/__main__.py +0 -0
  101. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/de/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  102. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/es/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  103. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  104. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  105. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
  106. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +0 -0
  107. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  108. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  109. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/meta.zcml +0 -0
  110. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
  111. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
  112. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
  113. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
  114. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
  115. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
  116. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
  117. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/profiles.zcml +0 -0
  118. /pas_plugins_authomatic-2.0.0rc3/src/pas/plugins/authomatic/services/__init__.py → /pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/py.typed +0 -0
  119. /pas_plugins_authomatic-2.0.0rc3/tests/functional/conftest.py → /pas_plugins_authomatic-3.0.0/src/pas/plugins/authomatic/services/__init__.py +0 -0
  120. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/src/pas/plugins/authomatic/testing.py +0 -0
  121. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/conftest.py +0 -0
  122. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/functional/test_controlpanel.py +0 -0
  123. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/functional/test_controlpanel_functional.py +0 -0
  124. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/plugin/conftest.py +0 -0
  125. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/plugin/test_plugin.py +0 -0
  126. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/setup/test_setup_install.py +0 -0
  127. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/setup/test_setup_uninstall.py +0 -0
  128. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/setup/test_setuphandler.py +0 -0
  129. {pas_plugins_authomatic-2.0.0rc3 → pas_plugins_authomatic-3.0.0}/tests/setup/test_upgrades.py +0 -0
@@ -1,8 +1,7 @@
1
1
  !src/pas
2
2
  .coverage*
3
3
  .pydevproject
4
- .pytest_cache
5
- .ruff_cache
4
+ .*_cache
6
5
  .python-version
7
6
  .venv
8
7
  *.egg-info
@@ -16,3 +15,4 @@ instance
16
15
  requirements-mxdev.txt
17
16
  requirements.lock
18
17
  requirements.txt
18
+ sources/
@@ -8,6 +8,59 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 3.0.0 (2026-11-18)
12
+
13
+
14
+ ### Breaking changes:
15
+
16
+ - Dropped support for Plone 6.0. @ericof [#107](https://github.com/collective/pas.plugins.authomatic/issues/107)
17
+ - Dropped support for Python 3.10. @ericof [#109](https://github.com/collective/pas.plugins.authomatic/issues/109)
18
+
19
+
20
+ ### New features:
21
+
22
+ - Added support for Plone 6.2. @ericof, @djay [#106](https://github.com/collective/pas.plugins.authomatic/issues/106)
23
+ - Added support for Python 3.14. @ericof [#108](https://github.com/collective/pas.plugins.authomatic/issues/108)
24
+ - Added type annotations across the package and shipped a `py.typed` marker so downstream code can type-check against it (PEP 561). @ericof [#111](https://github.com/collective/pas.plugins.authomatic/issues/111)
25
+ - Added `export_plugin_data` and `import_plugin_data` helpers (in `pas.plugins.authomatic.utils.exportimport`) to export the plugin's user identities to a JSON file and import them back, for use during site migrations. @ericof [#113](https://github.com/collective/pas.plugins.authomatic/issues/113)
26
+ - Changed the default `userid_factory_name` from `uuid` to `username_userid`, so new installations get deterministic, human-meaningful user ids that are easier to target with permissions and group assignments. Existing sites keep their configured value. @ericof [#114](https://github.com/collective/pas.plugins.authomatic/issues/114)
27
+
28
+
29
+ ### Internal:
30
+
31
+ - Converted the package to a PEP 420 native namespace, dropping the legacy `pkg_resources` namespace declarations. @ericof, , @djay [#105](https://github.com/collective/pas.plugins.authomatic/issues/105)
32
+ - Added a `make typecheck` target (mypy) and wired it into `make check`; modernized `setuphandlers` to use `plone.api` and the `plone.base` `INonInstallable` import. @ericof [#111](https://github.com/collective/pas.plugins.authomatic/issues/111)
33
+ - Reorganized the package following cookieplone conventions: promoted `utils` to a package (`content`/`plugin`/`request`/`settings`), split `useridfactories` into a package, added `vocabularies` and a `config` module, and slimmed `interfaces` down to interface definitions. Also modernized the `IPloneSiteRoot` and request imports. @ericof [#112](https://github.com/collective/pas.plugins.authomatic/issues/112)
34
+ - Prepare the release.
35
+ @ale-rt [#117](https://github.com/collective/pas.plugins.authomatic/issues/117)
36
+ - Consolidated the package logger into a single `pas.plugins.authomatic.logger` and removed the redundant `log.py` module. @ericof
37
+ - Disabled `fail-fast` in the CI test matrix so a single failing job no longer cancels the others. @ericof
38
+ - Excluded the unsupported Python 3.14 / Plone 6.1 combination from the CI test matrix. @ericof
39
+ - Ran the CI coverage job in parallel with the test matrix instead of waiting for it to finish. @ericof
40
+
41
+
42
+ ### Documentation:
43
+
44
+ - Updated the README: bumped the minimum Python to 3.11, corrected the changelog filename to `CHANGELOG.md`, and documented the `documentation` and `tests` news fragment types. @ericof
45
+
46
+
47
+ ### Tests
48
+
49
+ - Expanded test coverage across the add-on: the `utils` subpackages, the user-id factories and their dispatcher, the `vocabularies`, the REST and Zope request adapters, and the `config` validator. @ericof [#112](https://github.com/collective/pas.plugins.authomatic/issues/112)
50
+ - Upgrade pytest-plone to `1.1.0` and reused the built-in `anon_request` and `functional_portal` fixtures from pytest-plone instead of the local re-implementations. @ericof
51
+
52
+ ## 2.0.0 (2025-05-15)
53
+
54
+
55
+ ### Internal:
56
+
57
+ - GHA: Use plone/meta shared workflows. @ericof [#102](https://github.com/collective/pas.plugins.authomatic/issues/102)
58
+
59
+
60
+ ### Documentation:
61
+
62
+ - Update README file with release instructions. @ericof
63
+
11
64
  ## 2.0.0rc3 (2025-04-11)
12
65
 
13
66
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: pas.plugins.authomatic
3
- Version: 2.0.0rc3
3
+ Version: 3.0.0
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
@@ -14,39 +14,41 @@ Keywords: Authentication,OAuth,PAS,Plone,Python
14
14
  Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Environment :: Web Environment
16
16
  Classifier: Framework :: Plone
17
- Classifier: Framework :: Plone :: 6.0
18
17
  Classifier: Framework :: Plone :: 6.1
18
+ Classifier: Framework :: Plone :: 6.2
19
19
  Classifier: Framework :: Plone :: Addon
20
20
  Classifier: Framework :: Zope
21
21
  Classifier: Framework :: Zope :: 5
22
- Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
23
22
  Classifier: Programming Language :: Python
24
23
  Classifier: Programming Language :: Python :: 3 :: Only
25
- Classifier: Programming Language :: Python :: 3.10
26
24
  Classifier: Programming Language :: Python :: 3.11
27
25
  Classifier: Programming Language :: Python :: 3.12
28
26
  Classifier: Programming Language :: Python :: 3.13
29
- Requires-Python: >=3.10
27
+ Classifier: Programming Language :: Python :: 3.14
28
+ Requires-Python: >=3.11
30
29
  Requires-Dist: authomatic>=1.3.0
31
30
  Requires-Dist: plone-api
32
- Requires-Dist: plone-restapi>=9.10.0
33
- Requires-Dist: products-cmfplone>=6.0
31
+ Requires-Dist: plone-restapi
32
+ Requires-Dist: products-cmfplone>=6.1
34
33
  Provides-Extra: test
35
34
  Requires-Dist: collective-mockmailhost; extra == 'test'
35
+ Requires-Dist: mypy; extra == 'test'
36
36
  Requires-Dist: plone-app-robotframework[debug]; extra == 'test'
37
37
  Requires-Dist: plone-app-testing; extra == 'test'
38
38
  Requires-Dist: plone-restapi[test]; extra == 'test'
39
39
  Requires-Dist: pytest-cov; extra == 'test'
40
- Requires-Dist: pytest-plone>=1.0.0a1; extra == 'test'
40
+ Requires-Dist: pytest-plone>=1.0.0; extra == 'test'
41
41
  Requires-Dist: zest-releaser[recommended]; extra == 'test'
42
- Requires-Dist: zest-releaser[recommended]>=9.5.0; extra == 'test'
43
- Requires-Dist: zestreleaser-towncrier>=1.3.0; extra == 'test'
42
+ Requires-Dist: zestreleaser-towncrier; extra == 'test'
44
43
  Description-Content-Type: text/markdown
45
44
 
46
- <div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
45
+ <div align="center">
47
46
 
47
+ <img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" />
48
48
  <h1 align="center">OAuth2 / OpenId Authentication in Plone</h1>
49
49
 
50
+ </div>
51
+
50
52
  <div align="center">
51
53
 
52
54
  [![PyPI](https://img.shields.io/pypi/v/pas.plugins.authomatic)](https://pypi.org/project/pas.plugins.authomatic/)
@@ -58,8 +60,7 @@ Description-Content-Type: text/markdown
58
60
 
59
61
  [![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/pas.plugins.authomatic)](https://pypi.org/project/pas.plugins.authomatic/)
60
62
 
61
- [![Code analysis checks](https://github.com/collective/pas.plugins.authomatic/actions/workflows/code-analysis.yml/badge.svg)](https://github.com/collective/pas.plugins.authomatic/actions/workflows/code-analysis.yml)
62
- [![Tests](https://github.com/collective/pas.plugins.authomatic/actions/workflows/tests.yaml/badge.svg)](https://github.com/collective/pas.plugins.authomatic/actions/workflows/tests.yaml)
63
+ [![CI](https://github.com/collective/pas.plugins.authomatic/actions/workflows/main.yml/badge.svg)](https://github.com/collective/pas.plugins.authomatic/actions/workflows/main.yml)
63
64
  ![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)
64
65
 
65
66
  [![GitHub contributors](https://img.shields.io/github/contributors/collective/pas.plugins.authomatic)](https://github.com/collective/pas.plugins.authomatic)
@@ -246,9 +247,62 @@ There are some differences in configuration:
246
247
  - Each provider can get an optional entry `propertymap`.
247
248
  It is a mapping from authomatic/provider user properties to plone user properties, like `"fullname": "name",`. Look at each providers documentation which properties are available.
248
249
 
250
+ ## Migrating user identities
251
+
252
+ When migrating a site — for example moving to a new instance — you can export the complete set of user identities stored in the Authomatic plugin to a JSON file and import them again later.
253
+
254
+ Two helper functions are available in `pas.plugins.authomatic.utils.exportimport`:
255
+
256
+ - `export_plugin_data(path)`: writes all stored identities to the JSON file at `path` and returns the path.
257
+ - `import_plugin_data(path)`: reads the JSON file at `path` and restores the identities into the plugin, returning `True` on success (or `False` when no Authomatic plugin is installed).
258
+
259
+ Both accept an optional `delimiter` argument used to serialize the provider identity keys (defaults to `|`).
260
+ Using the console, to export the identities:
261
+
262
+ ```python
263
+ from pas.plugins.authomatic.utils import exportimport
264
+ from pathlib import Path
265
+ from plone import api
266
+ from zope.component.hooks import setSite
267
+
268
+
269
+ path = Path("export_authomatic.json")
270
+
271
+ app = globals()["app"]
272
+ site = app.Plone
273
+ setSite(site)
274
+
275
+ with api.env.adopt_roles(["Manager"]):
276
+ exportimport.export_plugin_data(path)
277
+
278
+ ```
279
+
280
+ To import them again:
281
+
282
+ ```python
283
+ from pas.plugins.authomatic.utils import exportimport
284
+ from pathlib import Path
285
+ from plone import api
286
+ from zope.component.hooks import setSite
287
+
288
+ import transaction
289
+
290
+
291
+ path = Path("export_authomatic.json")
292
+
293
+ app = globals()["app"]
294
+ site = app.Plone
295
+ setSite(site)
296
+
297
+ with api.env.adopt_roles(["Manager"]):
298
+ exportimport.import_plugin_data(path)
299
+
300
+ transaction.commit()
301
+ ```
302
+
249
303
  ## Integration with Entra ID
250
304
 
251
- Enumeration PAS plugin: if you're using **pas.plugins.authomatic** with *Microsoft Entra ID*, we recommend pairing it with [pas.plugins.eea](https://github.com/eea/pas.plugins.eea) for proper user enumeration and metadata synchronization. This complementary plugin enables listing all the Entra ID users and groups and is compatible with both Plone 5 and Plone 6.
305
+ Enumeration PAS plugin: if you're using **pas.plugins.authomatic** with *Microsoft Entra ID*, we recommend pairing it with [pas.plugins.eea](https://github.com/eea/pas.plugins.eea) for proper user enumeration and metadata synchronization. This complementary plugin enables listing all the Entra ID users and groups and is compatible with Plone 6.1 and 6.2.
252
306
 
253
307
  ## Source Code and Contributions
254
308
 
@@ -265,7 +319,7 @@ We appreciate any contribution and if a release is needed to be done on PyPI, pl
265
319
 
266
320
  ### Development
267
321
 
268
- You need a working `python` environment (system, virtualenv, pyenv, etc) version 3.7 or superior.
322
+ You need a working `python` environment (system, virtualenv, pyenv, etc) version 3.11 or superior.
269
323
 
270
324
  Then install the dependencies and a development instance using:
271
325
 
@@ -289,9 +343,9 @@ By default we use the latest Plone version in the 6.x series.
289
343
 
290
344
  ### Changelog entries
291
345
 
292
- The `CHANGES.md` file is managed using [towncrier](https://towncrier.readthedocs.io/). All non trivial changes must be accompanied by an entry in the `news` directory. Using such a tool instead of editing the file directly, has the following benefits:
346
+ The `CHANGELOG.md` file is managed using [towncrier](https://towncrier.readthedocs.io/). All non trivial changes must be accompanied by an entry in the `news` directory. Using such a tool instead of editing the file directly, has the following benefits:
293
347
 
294
- * It avoids merge conflicts in CHANGES.md.
348
+ * It avoids merge conflicts in CHANGELOG.md.
295
349
  * It avoids news entries ending up under the wrong version header.
296
350
 
297
351
  The best way of adding news entries is this:
@@ -303,46 +357,23 @@ The best way of adding news entries is this:
303
357
  * For bug fixes: 42.bugfix.
304
358
  * For new features: 42.feature.
305
359
  * For internal changes: 42.internal.
306
- * For breaking changs: 42.breaking.
360
+ * For breaking changes: 42.breaking.
361
+ * For documentation changes: 42.documentation.
362
+ * For test changes: 42.tests.
307
363
  * Any other extensions are ignored.
308
364
 
309
- * The contents of this file should be markdown formatted text that will be used as the content of the CHANGES.md entry.
365
+ * The contents of this file should be markdown formatted text that will be used as the content of the CHANGELOG.md entry.
310
366
 
311
- Towncrier will automatically add a reference to the issue when rendering the CHANGES.md file.
367
+ Towncrier will automatically add a reference to the issue when rendering the CHANGELOG.md file.
312
368
 
313
369
  ### Releasing `pas.plugins.authomatic`
314
370
 
315
371
  Releasing `pas.plugins.authomatic` is done using a combination of [zest.releaser](https://zestreleaser.readthedocs.io/) and [hatch](https://hatch.pypa.io/latest/).
316
372
 
317
- The release process consists of three steps: **Pre-release**, **Release**, and **Post-release**.
318
-
319
- #### Pre-release
320
- Run the following command to populate the `CHANGES.md` file with the entries available in the `news/` directory:
321
-
322
- ```bash
323
- .venv/bin/prerelease
324
- ```
325
-
326
- #### Release
327
-
328
- 1. Create a new Git tag:
329
- ```bash
330
- git tag -a {VERSION} -m "Release {VERSION}"
331
- ```
332
- 2. Build the project:
333
- ```bash
334
- hatch build
335
- ```
336
- 3. Publish the package to PyPI:
337
- ```bash
338
- hatch publish
339
- ```
340
-
341
- #### Post-release
342
- Run the following command to bump the package version, create a new commit, and push all changes to GitHub:
373
+ To release the package run:
343
374
 
344
375
  ```bash
345
- .venv/bin/postrelease
376
+ make release
346
377
  ```
347
378
 
348
379
  ## License
@@ -1,7 +1,10 @@
1
- <div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
1
+ <div align="center">
2
2
 
3
+ <img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" />
3
4
  <h1 align="center">OAuth2 / OpenId Authentication in Plone</h1>
4
5
 
6
+ </div>
7
+
5
8
  <div align="center">
6
9
 
7
10
  [![PyPI](https://img.shields.io/pypi/v/pas.plugins.authomatic)](https://pypi.org/project/pas.plugins.authomatic/)
@@ -13,8 +16,7 @@
13
16
 
14
17
  [![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/pas.plugins.authomatic)](https://pypi.org/project/pas.plugins.authomatic/)
15
18
 
16
- [![Code analysis checks](https://github.com/collective/pas.plugins.authomatic/actions/workflows/code-analysis.yml/badge.svg)](https://github.com/collective/pas.plugins.authomatic/actions/workflows/code-analysis.yml)
17
- [![Tests](https://github.com/collective/pas.plugins.authomatic/actions/workflows/tests.yaml/badge.svg)](https://github.com/collective/pas.plugins.authomatic/actions/workflows/tests.yaml)
19
+ [![CI](https://github.com/collective/pas.plugins.authomatic/actions/workflows/main.yml/badge.svg)](https://github.com/collective/pas.plugins.authomatic/actions/workflows/main.yml)
18
20
  ![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)
19
21
 
20
22
  [![GitHub contributors](https://img.shields.io/github/contributors/collective/pas.plugins.authomatic)](https://github.com/collective/pas.plugins.authomatic)
@@ -201,9 +203,62 @@ There are some differences in configuration:
201
203
  - Each provider can get an optional entry `propertymap`.
202
204
  It is a mapping from authomatic/provider user properties to plone user properties, like `"fullname": "name",`. Look at each providers documentation which properties are available.
203
205
 
206
+ ## Migrating user identities
207
+
208
+ When migrating a site — for example moving to a new instance — you can export the complete set of user identities stored in the Authomatic plugin to a JSON file and import them again later.
209
+
210
+ Two helper functions are available in `pas.plugins.authomatic.utils.exportimport`:
211
+
212
+ - `export_plugin_data(path)`: writes all stored identities to the JSON file at `path` and returns the path.
213
+ - `import_plugin_data(path)`: reads the JSON file at `path` and restores the identities into the plugin, returning `True` on success (or `False` when no Authomatic plugin is installed).
214
+
215
+ Both accept an optional `delimiter` argument used to serialize the provider identity keys (defaults to `|`).
216
+ Using the console, to export the identities:
217
+
218
+ ```python
219
+ from pas.plugins.authomatic.utils import exportimport
220
+ from pathlib import Path
221
+ from plone import api
222
+ from zope.component.hooks import setSite
223
+
224
+
225
+ path = Path("export_authomatic.json")
226
+
227
+ app = globals()["app"]
228
+ site = app.Plone
229
+ setSite(site)
230
+
231
+ with api.env.adopt_roles(["Manager"]):
232
+ exportimport.export_plugin_data(path)
233
+
234
+ ```
235
+
236
+ To import them again:
237
+
238
+ ```python
239
+ from pas.plugins.authomatic.utils import exportimport
240
+ from pathlib import Path
241
+ from plone import api
242
+ from zope.component.hooks import setSite
243
+
244
+ import transaction
245
+
246
+
247
+ path = Path("export_authomatic.json")
248
+
249
+ app = globals()["app"]
250
+ site = app.Plone
251
+ setSite(site)
252
+
253
+ with api.env.adopt_roles(["Manager"]):
254
+ exportimport.import_plugin_data(path)
255
+
256
+ transaction.commit()
257
+ ```
258
+
204
259
  ## Integration with Entra ID
205
260
 
206
- Enumeration PAS plugin: if you're using **pas.plugins.authomatic** with *Microsoft Entra ID*, we recommend pairing it with [pas.plugins.eea](https://github.com/eea/pas.plugins.eea) for proper user enumeration and metadata synchronization. This complementary plugin enables listing all the Entra ID users and groups and is compatible with both Plone 5 and Plone 6.
261
+ Enumeration PAS plugin: if you're using **pas.plugins.authomatic** with *Microsoft Entra ID*, we recommend pairing it with [pas.plugins.eea](https://github.com/eea/pas.plugins.eea) for proper user enumeration and metadata synchronization. This complementary plugin enables listing all the Entra ID users and groups and is compatible with Plone 6.1 and 6.2.
207
262
 
208
263
  ## Source Code and Contributions
209
264
 
@@ -220,7 +275,7 @@ We appreciate any contribution and if a release is needed to be done on PyPI, pl
220
275
 
221
276
  ### Development
222
277
 
223
- You need a working `python` environment (system, virtualenv, pyenv, etc) version 3.7 or superior.
278
+ You need a working `python` environment (system, virtualenv, pyenv, etc) version 3.11 or superior.
224
279
 
225
280
  Then install the dependencies and a development instance using:
226
281
 
@@ -244,9 +299,9 @@ By default we use the latest Plone version in the 6.x series.
244
299
 
245
300
  ### Changelog entries
246
301
 
247
- The `CHANGES.md` file is managed using [towncrier](https://towncrier.readthedocs.io/). All non trivial changes must be accompanied by an entry in the `news` directory. Using such a tool instead of editing the file directly, has the following benefits:
302
+ The `CHANGELOG.md` file is managed using [towncrier](https://towncrier.readthedocs.io/). All non trivial changes must be accompanied by an entry in the `news` directory. Using such a tool instead of editing the file directly, has the following benefits:
248
303
 
249
- * It avoids merge conflicts in CHANGES.md.
304
+ * It avoids merge conflicts in CHANGELOG.md.
250
305
  * It avoids news entries ending up under the wrong version header.
251
306
 
252
307
  The best way of adding news entries is this:
@@ -258,46 +313,23 @@ The best way of adding news entries is this:
258
313
  * For bug fixes: 42.bugfix.
259
314
  * For new features: 42.feature.
260
315
  * For internal changes: 42.internal.
261
- * For breaking changs: 42.breaking.
316
+ * For breaking changes: 42.breaking.
317
+ * For documentation changes: 42.documentation.
318
+ * For test changes: 42.tests.
262
319
  * Any other extensions are ignored.
263
320
 
264
- * The contents of this file should be markdown formatted text that will be used as the content of the CHANGES.md entry.
321
+ * The contents of this file should be markdown formatted text that will be used as the content of the CHANGELOG.md entry.
265
322
 
266
- Towncrier will automatically add a reference to the issue when rendering the CHANGES.md file.
323
+ Towncrier will automatically add a reference to the issue when rendering the CHANGELOG.md file.
267
324
 
268
325
  ### Releasing `pas.plugins.authomatic`
269
326
 
270
327
  Releasing `pas.plugins.authomatic` is done using a combination of [zest.releaser](https://zestreleaser.readthedocs.io/) and [hatch](https://hatch.pypa.io/latest/).
271
328
 
272
- The release process consists of three steps: **Pre-release**, **Release**, and **Post-release**.
273
-
274
- #### Pre-release
275
- Run the following command to populate the `CHANGES.md` file with the entries available in the `news/` directory:
276
-
277
- ```bash
278
- .venv/bin/prerelease
279
- ```
280
-
281
- #### Release
282
-
283
- 1. Create a new Git tag:
284
- ```bash
285
- git tag -a {VERSION} -m "Release {VERSION}"
286
- ```
287
- 2. Build the project:
288
- ```bash
289
- hatch build
290
- ```
291
- 3. Publish the package to PyPI:
292
- ```bash
293
- hatch publish
294
- ```
295
-
296
- #### Post-release
297
- Run the following command to bump the package version, create a new commit, and push all changes to GitHub:
329
+ To release the package run:
298
330
 
299
331
  ```bash
300
- .venv/bin/postrelease
332
+ make release
301
333
  ```
302
334
 
303
335
  ## License
@@ -4,7 +4,7 @@ dynamic = ["version"]
4
4
  description = "Provides OAuth2/OpenID login for Plone using Authomatic."
5
5
  readme = "README.md"
6
6
  license = {text = "GNU General Public License v2 (GPLv2)"}
7
- requires-python = ">=3.10"
7
+ requires-python = ">=3.11"
8
8
  authors = [
9
9
  { name = "Jens Klein", email = "dev@bluedynamics.com" },
10
10
  { name = "Érico Andrei", email = "ericof@plone.org" },
@@ -21,37 +21,37 @@ classifiers = [
21
21
  "Development Status :: 5 - Production/Stable",
22
22
  "Environment :: Web Environment",
23
23
  "Framework :: Plone",
24
- "Framework :: Plone :: 6.0",
25
24
  "Framework :: Plone :: 6.1",
25
+ "Framework :: Plone :: 6.2",
26
26
  "Framework :: Plone :: Addon",
27
27
  "Framework :: Zope",
28
28
  "Framework :: Zope :: 5",
29
- "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
30
29
  "Programming Language :: Python",
31
30
  "Programming Language :: Python :: 3 :: Only",
32
- "Programming Language :: Python :: 3.10",
33
31
  "Programming Language :: Python :: 3.11",
34
32
  "Programming Language :: Python :: 3.12",
35
33
  "Programming Language :: Python :: 3.13",
34
+ "Programming Language :: Python :: 3.14",
36
35
  ]
37
36
  dependencies = [
38
- "Products.CMFPlone>=6.0",
37
+ "Products.CMFPlone>=6.1",
39
38
  "authomatic>=1.3.0",
40
- "plone.restapi>=9.10.0",
39
+ "plone.restapi",
41
40
  "plone.api",
42
41
  ]
43
42
 
44
43
  [project.optional-dependencies]
45
44
  test = [
46
45
  "collective.MockMailHost",
46
+ "mypy",
47
47
  "plone.app.robotframework[debug]",
48
48
  "plone.app.testing",
49
49
  "plone.restapi[test]",
50
50
  "zest.releaser[recommended]",
51
51
  "pytest-cov",
52
- "pytest-plone>=1.0.0a1",
53
- "zest-releaser[recommended]>=9.5.0",
54
- "zestreleaser-towncrier>=1.3.0",
52
+ "pytest-plone>=1.0.0",
53
+ "zest-releaser[recommended]",
54
+ "zestreleaser-towncrier",
55
55
  ]
56
56
 
57
57
  [project.urls]
@@ -90,6 +90,16 @@ exclude = [
90
90
  [tool.hatch.build.targets.wheel]
91
91
  packages = ["src/pas",]
92
92
 
93
+ [tool.check-manifest]
94
+ ignore = [
95
+ ".editorconfig",
96
+ ".flake8",
97
+ ".vscode/*",
98
+ "Makefile",
99
+ "mx.ini",
100
+ "news/*",
101
+ ]
102
+
93
103
  [tool.uv]
94
104
  managed = false
95
105
 
@@ -140,7 +150,7 @@ enable-unstable-feature = [
140
150
  ]
141
151
 
142
152
  [tool.ruff]
143
- target-version = "py310"
153
+ target-version = "py311"
144
154
  line-length = 88
145
155
  fix = true
146
156
  lint.select = [
@@ -187,15 +197,26 @@ order-by-type = false
187
197
 
188
198
  [tool.ruff.format]
189
199
  preview = true
200
+ exclude = ["README.md"]
190
201
 
191
202
  [tool.ruff.lint.per-file-ignores]
192
203
  "tests/*" = ["E501", "RUF001", "S101"]
193
204
 
205
+ [tool.mypy]
206
+ python_version = "3.11"
207
+ ignore_missing_imports = true
208
+ # The package uses a PEP 420 native namespace (no __init__.py under src/pas),
209
+ # so tell mypy the source root explicitly to avoid "found twice under different
210
+ # module names" clashes with the installed ``authomatic`` distribution.
211
+ explicit_package_bases = true
212
+ namespace_packages = true
213
+ mypy_path = "src"
214
+
194
215
  [tool.pytest.ini_options]
195
216
  testpaths = ["tests"]
196
217
 
197
218
  [tool.coverage.run]
198
- source_pkgs = ["pas.plugins.authomatic", "tests"]
219
+ source_pkgs = ["pas.plugins.authomatic"]
199
220
  branch = true
200
221
  parallel = true
201
222
  omit = [
@@ -1,13 +1,20 @@
1
1
  from pas.plugins.authomatic.patches import apply_patches
2
+ from zope.i18nmessageid import MessageFactory
2
3
 
4
+ import logging
3
5
 
4
- __version__ = "2.0.0rc3"
6
+
7
+ __version__ = "3.0.0"
5
8
 
6
9
 
7
10
  PACKAGE_NAME = "pas.plugins.authomatic"
8
11
 
12
+ _ = MessageFactory(PACKAGE_NAME)
13
+
14
+
15
+ logger = logging.getLogger(PACKAGE_NAME)
9
16
 
10
- apply_patches()
17
+ apply_patches(logger)
11
18
 
12
19
 
13
20
  def initialize(context):