pas.plugins.oidc 2.0.0b4__tar.gz → 2.0.0rc2__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 (105) hide show
  1. pas_plugins_oidc-2.0.0rc2/.gitignore +52 -0
  2. pas_plugins_oidc-2.0.0b4/CHANGES.md → pas_plugins_oidc-2.0.0rc2/CHANGELOG.md +34 -0
  3. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/PKG-INFO +65 -214
  4. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/README.md +26 -6
  5. pas_plugins_oidc-2.0.0rc2/dependabot.yml +11 -0
  6. pas_plugins_oidc-2.0.0rc2/docs/Makefile +107 -0
  7. pas_plugins_oidc-2.0.0rc2/docs/_static/allowedgroups1.png +0 -0
  8. pas_plugins_oidc-2.0.0rc2/docs/_static/allowedgroups2.png +0 -0
  9. pas_plugins_oidc-2.0.0rc2/docs/_static/allowedgroups3.png +0 -0
  10. pas_plugins_oidc-2.0.0rc2/docs/conf.py +237 -0
  11. pas_plugins_oidc-2.0.0rc2/docs/index.md +26 -0
  12. pas_plugins_oidc-2.0.0rc2/docs/pyproject.toml +15 -0
  13. pas_plugins_oidc-2.0.0rc2/docs/robots.txt +8 -0
  14. pas_plugins_oidc-2.0.0rc2/docs/uv.lock +692 -0
  15. pas_plugins_oidc-2.0.0rc2/instance.yaml +3 -0
  16. pas_plugins_oidc-2.0.0rc2/pyproject.toml +219 -0
  17. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/__init__.py +2 -0
  18. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/browser/view.py +6 -15
  19. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/controlpanel/classic.py +8 -1
  20. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/controlpanel/deserializer.py +18 -9
  21. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/interfaces.py +10 -0
  22. pas_plugins_oidc-2.0.0b4/src/pas/plugins/oidc/locales/update.py → pas_plugins_oidc-2.0.0rc2/src/pas/plugins/oidc/locales/__main__.py +20 -21
  23. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/locales/de/LC_MESSAGES/pas.plugins.oidc.po +37 -17
  24. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/locales/en/LC_MESSAGES/pas.plugins.oidc.po +37 -17
  25. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/locales/es/LC_MESSAGES/pas.plugins.oidc.po +37 -17
  26. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/locales/pas.plugins.oidc.pot +38 -18
  27. pas_plugins_oidc-2.0.0rc2/src/pas/plugins/oidc/plugins.py +541 -0
  28. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/login/get.py +7 -8
  29. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/oidc/oidc.py +4 -6
  30. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/utils.py +36 -41
  31. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/conftest.py +8 -10
  32. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/controlpanel/test_controlpanel_api.py +0 -1
  33. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/docker-compose.yml +1 -3
  34. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/keycloak/Dockerfile +1 -1
  35. pas_plugins_oidc-2.0.0rc2/tests/keycloak/import/plone-realm.json +2478 -0
  36. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/plugin/test_plugin.py +3 -3
  37. pas_plugins_oidc-2.0.0rc2/tests/services/test_services_login_with_allowed_groups.py +36 -0
  38. pas_plugins_oidc-2.0.0b4/.coveragerc +0 -9
  39. pas_plugins_oidc-2.0.0b4/.pre-commit-config.yaml +0 -100
  40. pas_plugins_oidc-2.0.0b4/MANIFEST.in +0 -15
  41. pas_plugins_oidc-2.0.0b4/Makefile +0 -162
  42. pas_plugins_oidc-2.0.0b4/constraints.txt +0 -1
  43. pas_plugins_oidc-2.0.0b4/instance.yaml +0 -8
  44. pas_plugins_oidc-2.0.0b4/pyproject.toml +0 -180
  45. pas_plugins_oidc-2.0.0b4/requirements-docs.txt +0 -10
  46. pas_plugins_oidc-2.0.0b4/requirements.txt +0 -2
  47. pas_plugins_oidc-2.0.0b4/setup.cfg +0 -4
  48. pas_plugins_oidc-2.0.0b4/setup.py +0 -91
  49. pas_plugins_oidc-2.0.0b4/src/pas/plugins/oidc/plugins.py +0 -476
  50. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/PKG-INFO +0 -569
  51. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/SOURCES.txt +0 -87
  52. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/dependency_links.txt +0 -1
  53. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/entry_points.txt +0 -5
  54. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/namespace_packages.txt +0 -2
  55. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/not-zip-safe +0 -1
  56. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/requires.txt +0 -27
  57. pas_plugins_oidc-2.0.0b4/src/pas.plugins.oidc.egg-info/top_level.txt +0 -1
  58. pas_plugins_oidc-2.0.0b4/tests/keycloak/import/plone-realm.json +0 -2024
  59. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/CONTRIBUTORS.md +0 -0
  60. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/LICENSE.GPL +0 -0
  61. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/LICENSE.md +0 -0
  62. {pas_plugins_oidc-2.0.0b4/docs → pas_plugins_oidc-2.0.0rc2/docs/_static}/icon.png +0 -0
  63. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/docs/screenshot-settings.png +0 -0
  64. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/__init__.py +0 -0
  65. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/__init__.py +0 -0
  66. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/browser/__init__.py +0 -0
  67. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/browser/configure.zcml +0 -0
  68. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/configure.zcml +0 -0
  69. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/controlpanel/__init__.py +0 -0
  70. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/controlpanel/configure.zcml +0 -0
  71. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/controlpanel/oidc.py +0 -0
  72. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/controlpanel/serializer.py +0 -0
  73. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/locales/__init__.py +0 -0
  74. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/profiles/default/browserlayer.xml +0 -0
  75. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/profiles/default/controlpanel.xml +0 -0
  76. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/profiles/default/metadata.xml +0 -0
  77. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/profiles/uninstall/browserlayer.xml +0 -0
  78. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/__init__.py +0 -0
  79. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/configure.zcml +0 -0
  80. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/login/__init__.py +0 -0
  81. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/login/configure.zcml +0 -0
  82. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/oidc/__init__.py +0 -0
  83. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/services/oidc/configure.zcml +0 -0
  84. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/session.py +0 -0
  85. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/setuphandlers.py +0 -0
  86. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/testing.py +0 -0
  87. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/upgrades/__init__.py +0 -0
  88. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/upgrades/configure.zcml +0 -0
  89. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/src/pas/plugins/oidc/www/oidcPluginForm.zpt +0 -0
  90. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/controlpanel/conftest.py +0 -0
  91. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/functional/conftest.py +0 -0
  92. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/functional/test_controlpanel_classic.py +0 -0
  93. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/functional/test_functional.py +0 -0
  94. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/keycloak/import/.gitkeep +0 -0
  95. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/keycloak/import/plone-test-realm.json +0 -0
  96. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/services/conftest.py +0 -0
  97. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/services/test_services_login_get.py +0 -0
  98. /pas_plugins_oidc-2.0.0b4/tests/services/test_servides_login_get_multiple_plugins.py → /pas_plugins_oidc-2.0.0rc2/tests/services/test_services_login_get_multiple_plugins.py +0 -0
  99. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/services/test_services_oidc_get.py +0 -0
  100. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/services/test_services_oidc_post.py +0 -0
  101. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/setup/test_setup_install.py +0 -0
  102. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/setup/test_setup_uninstall.py +0 -0
  103. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/utils/test_utils_flow.py +0 -0
  104. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/utils/test_utils_str.py +0 -0
  105. {pas_plugins_oidc-2.0.0b4 → pas_plugins_oidc-2.0.0rc2}/tests/utils/test_utils_url.py +0 -0
@@ -0,0 +1,52 @@
1
+ *.egg-info
2
+ *.pyc
3
+ *.pyo
4
+
5
+ # translation related
6
+ *.mo
7
+
8
+ # tools related
9
+ build/
10
+ .coverage
11
+ .*project
12
+ coverage.xml
13
+ dist/
14
+ docs/_build
15
+ __pycache__/
16
+ .tox
17
+ node_modules/
18
+
19
+ # venv / buildout related
20
+ bin/
21
+ develop-eggs/
22
+ eggs/
23
+ .eggs/
24
+ etc/
25
+ .installed.cfg
26
+ include/
27
+ lib/
28
+ lib64
29
+ .mr.developer.cfg
30
+ parts/
31
+ pyvenv.cfg
32
+ var/
33
+ local.cfg
34
+ .venv
35
+
36
+ # mxdev
37
+ /instance/
38
+ /.make-sentinels/
39
+ /*-mxdev.txt
40
+ /reports/
41
+ /sources/
42
+ /venv/
43
+ .installed.txt
44
+ constraints*.txt
45
+ requirements*.txt
46
+
47
+ requirements-mxdev.txt
48
+
49
+ /.python-version
50
+ /dependencies.svg
51
+ .pytest_cache
52
+ .ruff_cache
@@ -9,6 +9,40 @@
9
9
 
10
10
  <!-- towncrier release notes start -->
11
11
 
12
+ ## 2.0.0rc2 (2025-03-26)
13
+
14
+
15
+ ### Internal:
16
+
17
+ - Add environment variable KEYCLOAK_VERSION to allow choosing which version of Keycloak will be used @ericof
18
+ - GHA: Do not fail fast during CI tests. @ericof
19
+
20
+
21
+ ### Documentation:
22
+
23
+ - Update README to refer to using uv instead of tox @ericof
24
+
25
+ ## 2.0.0rc1 (2025-03-26)
26
+
27
+
28
+ ### Breaking changes:
29
+
30
+ - Drop support for Python 3.8 @ericof
31
+ - Drop support for Python 3.9 @ericof
32
+
33
+
34
+ ### New features:
35
+
36
+ - Add support for Plone 6.1 @ericof
37
+ - Add support for Python 3.12 @ericof
38
+ - Add support for Python 3.13 @ericof
39
+
40
+
41
+ ### Internal:
42
+
43
+ - Move to pyproject.toml, hatchling and uv @ericof [#71](https://github.com/collective/pas.plugins.oidc/issues/71)
44
+ - Update GHA workflows @ericof
45
+
12
46
  ## 2.0.0b4 (2025-02-28)
13
47
 
14
48
 
@@ -1,74 +1,57 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pas.plugins.oidc
3
- Version: 2.0.0b4
3
+ Version: 2.0.0rc2
4
4
  Summary: OIDC support for Plone sites
5
- Home-page: https://github.com/collective/pas.plugins.oidc
6
- Author: mamico
7
- Author-email: mauro.amico@gmail.com
8
- License: GPL version 2
9
- Project-URL: PyPI, https://pypi.python.org/pypi/pas.plugins.oidc
5
+ Project-URL: Homepage, https://github.com/collective/pas.plugins.oidc
6
+ Project-URL: PyPI, https://pypi.org/project/pas.plugins.oidc
10
7
  Project-URL: Source, https://github.com/collective/pas.plugins.oidc
11
8
  Project-URL: Tracker, https://github.com/collective/pas.plugins.oidc/issues
12
- Keywords: Python Plone CMS PAS Authentication OAuth OIDC
9
+ Author-email: Mauro Amico <mauro.amico@gmail.com>, Érico Andrei <ericof@plone.org>
10
+ License-Expression: GPL-2.0-only
11
+ License-File: LICENSE.GPL
12
+ License-File: LICENSE.md
13
+ Keywords: Authentication,CMS,OAuth,OIDC,PAS,Plone,Python
13
14
  Classifier: Development Status :: 4 - Beta
14
15
  Classifier: Environment :: Web Environment
15
16
  Classifier: Framework :: Plone
16
- Classifier: Framework :: Plone :: Addon
17
17
  Classifier: Framework :: Plone :: 6.0
18
+ Classifier: Framework :: Plone :: 6.1
19
+ Classifier: Framework :: Plone :: Addon
20
+ Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
21
+ Classifier: Operating System :: OS Independent
18
22
  Classifier: Programming Language :: Python
19
- Classifier: Programming Language :: Python :: 3.8
20
- Classifier: Programming Language :: Python :: 3.9
21
23
  Classifier: Programming Language :: Python :: 3.10
22
24
  Classifier: Programming Language :: Python :: 3.11
23
- Classifier: Operating System :: OS Independent
24
- Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
25
- Requires-Python: >=3.8
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE.GPL
28
- License-File: LICENSE.md
29
- Requires-Dist: setuptools
30
- Requires-Dist: Plone
31
- Requires-Dist: Zope
32
- Requires-Dist: Products.CMFCore
33
- Requires-Dist: plone.api
34
- Requires-Dist: plone.app.registry
35
- Requires-Dist: plone.base
36
- Requires-Dist: plone.protect
37
- Requires-Dist: plone.restapi>=9.10.0
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Requires-Python: >=3.10
38
28
  Requires-Dist: oic
29
+ Requires-Dist: plone-api
30
+ Requires-Dist: plone-app-registry
31
+ Requires-Dist: plone-base
32
+ Requires-Dist: plone-protect
33
+ Requires-Dist: plone-restapi>=9.10.0
34
+ Requires-Dist: products-cmfcore
35
+ Requires-Dist: products-cmfplone>=6.0
39
36
  Requires-Dist: requests
40
- Requires-Dist: z3c.form
37
+ Requires-Dist: z3c-form
38
+ Requires-Dist: zope
41
39
  Provides-Extra: test
42
- Requires-Dist: zope.pytestlayer; extra == "test"
43
- Requires-Dist: plone.app.contenttypes; extra == "test"
44
- Requires-Dist: plone.app.testing; extra == "test"
45
- Requires-Dist: plone.restapi[test]; extra == "test"
46
- Requires-Dist: plone.testing; extra == "test"
47
- Requires-Dist: pytest-cov; extra == "test"
48
- Requires-Dist: pytest-plone>=0.2.0; extra == "test"
49
- Requires-Dist: pytest-docker; extra == "test"
50
- Requires-Dist: pytest-mock; extra == "test"
51
- Requires-Dist: pytest; extra == "test"
52
- Requires-Dist: zest.releaser[recommended]; extra == "test"
53
- Requires-Dist: zestreleaser.towncrier; extra == "test"
54
- Requires-Dist: pytest-mock; extra == "test"
55
- Requires-Dist: requests-mock; extra == "test"
56
- Dynamic: author
57
- Dynamic: author-email
58
- Dynamic: classifier
59
- Dynamic: description
60
- Dynamic: description-content-type
61
- Dynamic: home-page
62
- Dynamic: keywords
63
- Dynamic: license
64
- Dynamic: project-url
65
- Dynamic: provides-extra
66
- Dynamic: requires-dist
67
- Dynamic: requires-python
68
- Dynamic: summary
69
-
70
-
71
- <div align="center"><img alt="pas.plugins.oidc logo" src="https://raw.githubusercontent.com/collective/pas.plugins.oidc/main/docs/icon.png" width="70" /></div>
40
+ Requires-Dist: plone-app-contenttypes; extra == 'test'
41
+ Requires-Dist: plone-app-testing; extra == 'test'
42
+ Requires-Dist: plone-restapi[test]; extra == 'test'
43
+ Requires-Dist: plone-testing; extra == 'test'
44
+ Requires-Dist: pytest; extra == 'test'
45
+ Requires-Dist: pytest-cov; extra == 'test'
46
+ Requires-Dist: pytest-docker; extra == 'test'
47
+ Requires-Dist: pytest-mock; extra == 'test'
48
+ Requires-Dist: pytest-plone>=0.5.0; extra == 'test'
49
+ Requires-Dist: requests-mock; extra == 'test'
50
+ Requires-Dist: zest-releaser[recommended]>=9.5.0; extra == 'test'
51
+ Requires-Dist: zestreleaser-towncrier>=1.3.0; extra == 'test'
52
+ Description-Content-Type: text/markdown
53
+
54
+ <div align="center"><img alt="pas.plugins.oidc logo" src="https://raw.githubusercontent.com/collective/pas.plugins.oidc/main/docs/_static/icon.png" width="70" /></div>
72
55
 
73
56
  <h1 align="center">pas.plugins.oidc</h1>
74
57
 
@@ -83,7 +66,7 @@ Dynamic: summary
83
66
 
84
67
  [![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/pas.plugins.oidc)](https://pypi.org/project/pas.plugins.oidc/)
85
68
 
86
- [![Meta](https://github.com/collective/pas.plugins.oidc/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/pas.plugins.oidc/actions/workflows/meta.yml)
69
+ [![CI](https://github.com/collective/pas.plugins.oidc/actions/workflows/ci.yml/badge.svg)](https://github.com/collective/pas.plugins.oidc/actions/workflows/ci.yml)
87
70
  ![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)
88
71
 
89
72
  [![GitHub contributors](https://img.shields.io/github/contributors/collective/pas.plugins.oidc)](https://github.com/collective/pas.plugins.oidc)
@@ -156,7 +139,6 @@ When using this plugin with a [Volto frontend](https://6.docs.plone.org/volto/in
156
139
 
157
140
  Also, on the OpenID provider, configure the Redirect URL as **`<Path to your Plone site>`/login-oidc/oidc**.
158
141
 
159
-
160
142
  #### Classic UI
161
143
 
162
144
  When using this plugin with *Plone 6 Classic UI* the standard URLs used for login (`http://localhost:8080/Plone/login`) and logout (`http://localhost:8080/Plone/logout`)
@@ -296,6 +278,27 @@ To enable this functionality:
296
278
 
297
279
  2. Configure the OpenID Provider (e.g., Keycloak) to use the backchannel logout endpoint with the url: `.../acl_users/oidc/backchannel-logout`
298
280
 
281
+ #### Allowed groups
282
+
283
+ If you need to restrict access to a specific group, you can use the `Allowed groups` field in the plugin configuration. If the user is not in any of the groups listed, the login will be denied.
284
+
285
+ To use this feature, you need to create a new scope in the OIDC Provider (e.g., Keycloak) and add the groups to the user's token.
286
+
287
+ In Keycloak, go to the `Client Scopes` section and create a new scope named `groups`. Then, go to the `Mappers` tab and create a new mapper with the name `groups` and type `Group Membership` (Uncheck the `Full groups path` option).
288
+ You can find this configuration in the `plone` realm in the `tests` directory. The `plone` client is also configured to use the `groups` scope.
289
+
290
+ ![Create a new scope groups](docs/_static/allowedgroups1.png)
291
+
292
+ ![Add a new mapper Group Membership](docs/_static/allowedgroups2.png)
293
+
294
+ After that, go to the `Client Scopes` section and add the new scope to the client you are using with the plugin (for instance, `plone`).
295
+
296
+ ![Add the new scope to the client](docs/_static/allowedgroups3.png)
297
+
298
+ Finally, in the plugin configuration, add `groups` to the scopes field.
299
+
300
+ In the `Allowed groups` field, you can add the groups that are allowed to log in. For example, in this repository, you could set `Foundation Members`. Users who are not in this group will not be able to log in.
301
+
299
302
  ## Technical Decisions
300
303
 
301
304
  ### Usage of sessions in the login process
@@ -388,7 +391,7 @@ make format
388
391
 
389
392
  ### Run tests
390
393
 
391
- Testing of this package is done with [`pytest`](https://docs.pytest.org/) and [`tox`](https://tox.wiki/).
394
+ Testing of this package is done with [`pytest`](https://docs.pytest.org/).
392
395
 
393
396
  Run all tests with:
394
397
 
@@ -399,13 +402,13 @@ make test
399
402
  Run all tests but stop on the first error and open a `pdb` session:
400
403
 
401
404
  ```bash
402
- ./bin/tox -e test -- -x --pdb
405
+ uv run pytest -x --pdb
403
406
  ```
404
407
 
405
408
  Run tests named `TestServiceOIDCPost`:
406
409
 
407
410
  ```bash
408
- ./bin/tox -e test -- -k TestServiceOIDCPost
411
+ uv run pytest -k TestServiceOIDCPost
409
412
  ```
410
413
 
411
414
  ## References
@@ -415,155 +418,3 @@ Run tests named `TestServiceOIDCPost`:
415
418
  ## License
416
419
 
417
420
  The project is licensed under the GPLv2.
418
-
419
-
420
- # Contributors
421
-
422
- - mamico, mauro.amico@gmail.com
423
- - erral, Mikel Larreategi
424
- - alecghica, alec.ghica@eaudeweb.ro
425
- - macagua, leonardocaballero@gmail.com
426
- - ericof, ericof@plone.org
427
-
428
-
429
- # Changelog
430
-
431
- <!--
432
- You should *NOT* be adding new change log entries to this file.
433
- You should create a file in the news directory instead.
434
- For helpful instructions, please see:
435
- https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst
436
- -->
437
-
438
- <!-- towncrier release notes start -->
439
-
440
- ## 2.0.0b4 (2025-02-28)
441
-
442
-
443
- ### New features:
444
-
445
- - Add backchannel logout implementation for classic ui session @mamico [#67](https://github.com/collective/pas.plugins.oidc/issues/67)
446
-
447
- ## 2.0.0b3 (2025-02-03)
448
-
449
-
450
- ### New features:
451
-
452
- - Register the adapter as needed by the @login endpoint present in plone.restapi @erral [#47](https://github.com/collective/pas.plugins.oidc/issues/47)
453
- - Changes to make compatible with OAM (Oracle Access Manager) @djay [#65](https://github.com/collective/pas.plugins.oidc/pull/64)
454
-
455
-
456
- ### Internal:
457
-
458
- - Bump plone.restapi to 9.10.0 [@ericof]
459
-
460
-
461
- ## 2.0.0b2 (2024-12-09)
462
-
463
-
464
- ### New features:
465
-
466
- - Update the Deutsch translation [macagua] [#60](https://github.com/collective/pas.plugins.oidc/issues/60)
467
- - Implement control panel to configure pas.plugins.oidc [@ericof] [#65](https://github.com/collective/pas.plugins.oidc/issues/65)
468
-
469
-
470
- ### Documentation:
471
-
472
- - Fixed port numbers on README file [macagua] [#51](https://github.com/collective/pas.plugins.oidc/issues/51)
473
-
474
-
475
- ## 2.0.0b1 (2024-06-25)
476
-
477
-
478
- ### New features:
479
-
480
- - Added Deutsch translation
481
- [@macagua] [#45](https://github.com/collective/pas.plugins.oidc/issues/45)
482
- - Allow multiple instances of OIDC plugin in a given Plone site @erral [#48](https://github.com/collective/pas.plugins.oidc/issues/48)
483
- - Notify user events on creation and authentication. [@Arkusm][@ericof] [#53](https://github.com/collective/pas.plugins.oidc/issues/53)
484
- - Updated the latest .po templates for translate
485
- Updated Spanish translation
486
- [@macagua] [#55](https://github.com/collective/pas.plugins.oidc/issues/55)
487
-
488
-
489
- ### Internal:
490
-
491
- - Update configuration files @plone
492
-
493
-
494
- ### Documentation:
495
-
496
- - Recommend using `[pas.plugins.keycloakgroups](https://pypi.org/project/pas.plugins.keycloakgroups/)` for groups support with Keycloak [@ericof] [#42](https://github.com/collective/pas.plugins.oidc/issues/42)
497
-
498
-
499
- ## 2.0.0a1 (2023-11-23)
500
-
501
-
502
- ### New features:
503
-
504
- - Implement [plone/meta](https://github.com/plone/meta) and convert documentation to Markdown [@ericof] [#32](https://github.com/collective/pas.plugins.oidc/issues/32)
505
- - Drop support to Python 2.7 and Plone 5.2 [@ericof] [#33](https://github.com/collective/pas.plugins.oidc/issues/33)
506
- - Implement restapi services to handle authentication flow [@ericof] [#38](https://github.com/collective/pas.plugins.oidc/issues/38)
507
-
508
-
509
- ### Internal:
510
-
511
- - Rewrite tests from unittest to pytest with [pytest-plone](https://pypi.org/project/pytest-plone/) [@ericof] [#34](https://github.com/collective/pas.plugins.oidc/issues/34)
512
- - Allow dict instances to hold userinfo [@erral] [#35](https://github.com/collective/pas.plugins.oidc/issues/35)
513
- - Declare the minimum requirements for Plone/python in the readme [mamico] [#36](https://github.com/collective/pas.plugins.oidc/issues/36)
514
-
515
-
516
- ## 1.0.0 (2023-11-11)
517
-
518
- - Allow dict instances to hold userinfo [@erral]
519
-
520
- ## 1.0a6 (2023-07-20)
521
-
522
- - Added Spanish translation [@macagua]
523
-
524
- - Added improvements about i18n support [macagua]
525
-
526
- - Drop python 2.7 and Plone 4 support [@erral]
527
-
528
- - Add support for the post_logout parameter for logout api. [@ramiroluz]
529
-
530
-
531
- ## 1.0a5 (2023-04-05)
532
-
533
- - Catch exceptions during the OAuth process [@erral]
534
-
535
- - Update the plugin to make challenges.
536
- An anonymous user who visits a page for which you have to be authenticated,
537
- is redirected to the new require_login view on the plugin.
538
- This works the same way as the standard require_login page of Plone.
539
- [@maurits]
540
-
541
- - Add a property for the default userinfo instead of using only sub. [@eikichi18]
542
-
543
-
544
- ## 1.0a4 (2023-01-16)
545
-
546
- - Call getProperty only once when getting redirect_uris or scope. [@maurits]
547
-
548
- - use getProperty accessor [@mamico]
549
-
550
-
551
- ## 1.0a3 (2022-10-30)
552
-
553
- - Removed the hardcoded auth cookie name [@alecghica]
554
-
555
- - Fixed Python compatibility with version >= 3.6 [@alecghica]
556
-
557
- - check if url is in portal before redirect #2 [@erral]
558
-
559
- - manage came_from [@mamico]
560
-
561
- ## 1.0a2 (unreleased)
562
-
563
- - do userinforequest if there is a client.userinfo_endpoint [@mamico]
564
-
565
- ## 1.0a1 (unreleased)
566
-
567
- - Initial release. [@mamico]
568
-
569
-
@@ -1,4 +1,4 @@
1
- <div align="center"><img alt="pas.plugins.oidc logo" src="https://raw.githubusercontent.com/collective/pas.plugins.oidc/main/docs/icon.png" width="70" /></div>
1
+ <div align="center"><img alt="pas.plugins.oidc logo" src="https://raw.githubusercontent.com/collective/pas.plugins.oidc/main/docs/_static/icon.png" width="70" /></div>
2
2
 
3
3
  <h1 align="center">pas.plugins.oidc</h1>
4
4
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  [![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/pas.plugins.oidc)](https://pypi.org/project/pas.plugins.oidc/)
15
15
 
16
- [![Meta](https://github.com/collective/pas.plugins.oidc/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/pas.plugins.oidc/actions/workflows/meta.yml)
16
+ [![CI](https://github.com/collective/pas.plugins.oidc/actions/workflows/ci.yml/badge.svg)](https://github.com/collective/pas.plugins.oidc/actions/workflows/ci.yml)
17
17
  ![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)
18
18
 
19
19
  [![GitHub contributors](https://img.shields.io/github/contributors/collective/pas.plugins.oidc)](https://github.com/collective/pas.plugins.oidc)
@@ -86,7 +86,6 @@ When using this plugin with a [Volto frontend](https://6.docs.plone.org/volto/in
86
86
 
87
87
  Also, on the OpenID provider, configure the Redirect URL as **`<Path to your Plone site>`/login-oidc/oidc**.
88
88
 
89
-
90
89
  #### Classic UI
91
90
 
92
91
  When using this plugin with *Plone 6 Classic UI* the standard URLs used for login (`http://localhost:8080/Plone/login`) and logout (`http://localhost:8080/Plone/logout`)
@@ -226,6 +225,27 @@ To enable this functionality:
226
225
 
227
226
  2. Configure the OpenID Provider (e.g., Keycloak) to use the backchannel logout endpoint with the url: `.../acl_users/oidc/backchannel-logout`
228
227
 
228
+ #### Allowed groups
229
+
230
+ If you need to restrict access to a specific group, you can use the `Allowed groups` field in the plugin configuration. If the user is not in any of the groups listed, the login will be denied.
231
+
232
+ To use this feature, you need to create a new scope in the OIDC Provider (e.g., Keycloak) and add the groups to the user's token.
233
+
234
+ In Keycloak, go to the `Client Scopes` section and create a new scope named `groups`. Then, go to the `Mappers` tab and create a new mapper with the name `groups` and type `Group Membership` (Uncheck the `Full groups path` option).
235
+ You can find this configuration in the `plone` realm in the `tests` directory. The `plone` client is also configured to use the `groups` scope.
236
+
237
+ ![Create a new scope groups](docs/_static/allowedgroups1.png)
238
+
239
+ ![Add a new mapper Group Membership](docs/_static/allowedgroups2.png)
240
+
241
+ After that, go to the `Client Scopes` section and add the new scope to the client you are using with the plugin (for instance, `plone`).
242
+
243
+ ![Add the new scope to the client](docs/_static/allowedgroups3.png)
244
+
245
+ Finally, in the plugin configuration, add `groups` to the scopes field.
246
+
247
+ In the `Allowed groups` field, you can add the groups that are allowed to log in. For example, in this repository, you could set `Foundation Members`. Users who are not in this group will not be able to log in.
248
+
229
249
  ## Technical Decisions
230
250
 
231
251
  ### Usage of sessions in the login process
@@ -318,7 +338,7 @@ make format
318
338
 
319
339
  ### Run tests
320
340
 
321
- Testing of this package is done with [`pytest`](https://docs.pytest.org/) and [`tox`](https://tox.wiki/).
341
+ Testing of this package is done with [`pytest`](https://docs.pytest.org/).
322
342
 
323
343
  Run all tests with:
324
344
 
@@ -329,13 +349,13 @@ make test
329
349
  Run all tests but stop on the first error and open a `pdb` session:
330
350
 
331
351
  ```bash
332
- ./bin/tox -e test -- -x --pdb
352
+ uv run pytest -x --pdb
333
353
  ```
334
354
 
335
355
  Run tests named `TestServiceOIDCPost`:
336
356
 
337
357
  ```bash
338
- ./bin/tox -e test -- -k TestServiceOIDCPost
358
+ uv run pytest -k TestServiceOIDCPost
339
359
  ```
340
360
 
341
361
  ## References
@@ -0,0 +1,11 @@
1
+ # Generated from:
2
+ # https://github.com/plone/meta/tree/main/config/default
3
+ # See the inline comments on how to expand/tweak this configuration file
4
+ version: 2
5
+ updates:
6
+
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ # Check for updates to GitHub Actions every week
11
+ interval: "weekly"
@@ -0,0 +1,107 @@
1
+ ### Defensive settings for make:
2
+ # https://tech.davis-hansson.com/p/make/
3
+ SHELL:=bash
4
+ .ONESHELL:
5
+ .SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c
6
+ .SILENT:
7
+ .DELETE_ON_ERROR:
8
+ MAKEFLAGS+=--warn-undefined-variables
9
+ MAKEFLAGS+=--no-builtin-rules
10
+
11
+ # Python checks
12
+ UV?=uv
13
+
14
+ # installed?
15
+ ifeq (, $(shell which $(UV) ))
16
+ $(error "UV=$(UV) not found in $(PATH)")
17
+ endif
18
+
19
+ DOCS_FOLDER=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
20
+
21
+ VENV_FOLDER=$(DOCS_FOLDER)/.venv
22
+ BIN_FOLDER=$(VENV_FOLDER)/bin
23
+
24
+ # Sphinx variables
25
+ # You can set these variables from the command line.
26
+ SPHINXOPTS ?=
27
+ VALEOPTS ?=
28
+ # Internal variables.
29
+ BUILDDIR = $(DOCS_FOLDER)/_build/
30
+ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
31
+ VALEFILES := $(shell find $(DOCS_FOLDER) -type f -name "*.md" -print)
32
+
33
+ # We like colors
34
+ # From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
35
+ RED=`tput setaf 1`
36
+ GREEN=`tput setaf 2`
37
+ RESET=`tput sgr0`
38
+ YELLOW=`tput setaf 3`
39
+
40
+ .PHONY: all
41
+ all: install
42
+
43
+ # Add the following 'help' target to your Makefile
44
+ # And add help text after each target name starting with '\#\#'
45
+ .PHONY: help
46
+ help: ## This help message
47
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
48
+
49
+ $(VENV_FOLDER): ## Install dependencies
50
+ @echo "$(GREEN)==> Install environment$(RESET)"
51
+ @uv sync
52
+
53
+ .PHONY: install
54
+ install: $(VENV_FOLDER) ## Install dependencies
55
+
56
+ .PHONY: sync
57
+ sync: ## Install dependencies
58
+ @echo "$(GREEN)==> Sync environment$(RESET)"
59
+ @uv sync
60
+
61
+ .PHONY: clean
62
+ clean: ## Clean current and legacy docs build directories, and Python virtual environment
63
+ rm -rf $(VENV_FOLDER) .python-version
64
+ rm -rf $(BUILDDIR)
65
+
66
+ .PHONY: html
67
+ html: $(VENV_FOLDER) ## Build html
68
+ @uv run sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
69
+ @echo
70
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
71
+
72
+ .PHONY: build
73
+ build: html ## Build html
74
+
75
+ .PHONY: livehtml
76
+ livehtml: $(VENV_FOLDER) ## Rebuild Sphinx documentation on changes, with live-reload in the browser
77
+ @uv run sphinx-autobuild --ignore "*.swp" -b html . "$(BUILDDIR)/html" $(SPHINXOPTS)
78
+
79
+ .PHONY: linkcheck
80
+ linkcheck: $(VENV_FOLDER) ## Run linkcheck
81
+ @uv run sphinxbuild-b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
82
+ @echo
83
+ @echo "Link check complete; look for any errors in the above output " \
84
+ "or in $(BUILDDIR)/linkcheck/ ."
85
+
86
+ .PHONY: linkcheckbroken
87
+ linkcheckbroken: $(VENV_FOLDER) ## Run linkcheck and show only broken links
88
+ @uv run sphinxbuild-b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | GREP_COLORS='0;31' grep -wi "broken\|redirect" --color=always | GREP_COLORS='0;31' grep -vi "https://github.com/plone/volto/issues/" --color=always && if test $$? -eq 0; then exit 1; fi || test $$? -ne 0
89
+
90
+ .PHONY: vale
91
+ vale: $(VENV_FOLDER) ## Install (once) and run Vale style, grammar, and spell checks
92
+ @uv run vale sync
93
+ @uv run vale --no-wrap $(VALEOPTS) $(VALEFILES)
94
+ @echo
95
+ @echo "Vale is finished; look for any errors in the above output."
96
+
97
+ .PHONY: rtd-pr-preview
98
+ rtd-pr-preview: ## Build previews of pull requests that have documentation changes on Read the Docs via CI
99
+ @pip install uv
100
+ @uv sync
101
+ @uv run sphinx-build -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/
102
+
103
+ .PHONY: rtd-build
104
+ rtd-build: ## Build Volto Light Theme docs on RTD
105
+ @pip install uv
106
+ @uv sync
107
+ @uv run sphinx-build -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/