pas.plugins.authomatic 2.0.0b1__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.0b1 → pas.plugins.authomatic-2.0.0b3}/PKG-INFO +60 -2
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/README.md +58 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/__init__.py +1 -1
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/patches/authomatic.py +1 -1
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/configure.zcml +3 -6
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/login.py +12 -13
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pyproject.toml +3 -2
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/.gitignore +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/LICENSE.txt +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/authomatic.png +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/authomatic.pt +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/configure.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/controlpanel.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/browser/view.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/configure.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/restapi.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/integration/zope.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/interfaces.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/de/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/es/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +0 -0
- {pas.plugins.authomatic-2.0.0b1 → 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.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/locales/update.py +0 -0
- /pas.plugins.authomatic-2.0.0b1/pas/plugins/authomatic/logging.py → /pas.plugins.authomatic-2.0.0b3/pas/plugins/authomatic/log.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/meta.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/patches/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/plugin.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/profiles.zcml +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/__init__.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/services/authomatic.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/setuphandlers.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/testing.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/useridentities.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/useridfactories.py +0 -0
- {pas.plugins.authomatic-2.0.0b1 → 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'
|
|
@@ -280,6 +280,64 @@ make lint
|
|
|
280
280
|
|
|
281
281
|
By default we use the latest Plone version in the 6.x series.
|
|
282
282
|
|
|
283
|
+
### Changelog entries
|
|
284
|
+
|
|
285
|
+
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:
|
|
286
|
+
|
|
287
|
+
* It avoids merge conflicts in CHANGES.md.
|
|
288
|
+
* It avoids news entries ending up under the wrong version header.
|
|
289
|
+
|
|
290
|
+
The best way of adding news entries is this:
|
|
291
|
+
|
|
292
|
+
* First create an issue describing the change you want to make. The issue number serves as a unique indicator for the news entry. As example, let's say you have created issue 42.
|
|
293
|
+
|
|
294
|
+
* Create a file inside of the news/ directory, named after that issue number:
|
|
295
|
+
|
|
296
|
+
* For bug fixes: 42.bugfix.
|
|
297
|
+
* For new features: 42.feature.
|
|
298
|
+
* For internal changes: 42.internal.
|
|
299
|
+
* For breaking changs: 42.breaking.
|
|
300
|
+
* Any other extensions are ignored.
|
|
301
|
+
|
|
302
|
+
* The contents of this file should be markdown formatted text that will be used as the content of the CHANGES.md entry.
|
|
303
|
+
|
|
304
|
+
Towncrier will automatically add a reference to the issue when rendering the CHANGES.md file.
|
|
305
|
+
|
|
306
|
+
### Releasing `pas.plugins.authomatic`
|
|
307
|
+
|
|
308
|
+
Releasing `pas.plugins.authomatic` is done using a combination of [zest.releaser](https://zestreleaser.readthedocs.io/) and [hatch](https://hatch.pypa.io/latest/).
|
|
309
|
+
|
|
310
|
+
The release process consists of three steps: **Pre-release**, **Release**, and **Post-release**.
|
|
311
|
+
|
|
312
|
+
#### Pre-release
|
|
313
|
+
Run the following command to populate the `CHANGES.md` file with the entries available in the `news/` directory:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
.venv/bin/prerelease
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### Release
|
|
320
|
+
|
|
321
|
+
1. Create a new Git tag:
|
|
322
|
+
```bash
|
|
323
|
+
git tag -a {VERSION} -m "Release {VERSION}"
|
|
324
|
+
```
|
|
325
|
+
2. Build the project:
|
|
326
|
+
```bash
|
|
327
|
+
hatch build
|
|
328
|
+
```
|
|
329
|
+
3. Publish the package to PyPI:
|
|
330
|
+
```bash
|
|
331
|
+
hatch publish
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
#### Post-release
|
|
335
|
+
Run the following command to bump the package version, create a new commit, and push all changes to GitHub:
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
.venv/bin/postrelease
|
|
339
|
+
```
|
|
340
|
+
|
|
283
341
|
## License
|
|
284
342
|
|
|
285
343
|
The project is licensed under the GPLv2.
|
|
@@ -242,6 +242,64 @@ make lint
|
|
|
242
242
|
|
|
243
243
|
By default we use the latest Plone version in the 6.x series.
|
|
244
244
|
|
|
245
|
+
### Changelog entries
|
|
246
|
+
|
|
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:
|
|
248
|
+
|
|
249
|
+
* It avoids merge conflicts in CHANGES.md.
|
|
250
|
+
* It avoids news entries ending up under the wrong version header.
|
|
251
|
+
|
|
252
|
+
The best way of adding news entries is this:
|
|
253
|
+
|
|
254
|
+
* First create an issue describing the change you want to make. The issue number serves as a unique indicator for the news entry. As example, let's say you have created issue 42.
|
|
255
|
+
|
|
256
|
+
* Create a file inside of the news/ directory, named after that issue number:
|
|
257
|
+
|
|
258
|
+
* For bug fixes: 42.bugfix.
|
|
259
|
+
* For new features: 42.feature.
|
|
260
|
+
* For internal changes: 42.internal.
|
|
261
|
+
* For breaking changs: 42.breaking.
|
|
262
|
+
* Any other extensions are ignored.
|
|
263
|
+
|
|
264
|
+
* The contents of this file should be markdown formatted text that will be used as the content of the CHANGES.md entry.
|
|
265
|
+
|
|
266
|
+
Towncrier will automatically add a reference to the issue when rendering the CHANGES.md file.
|
|
267
|
+
|
|
268
|
+
### Releasing `pas.plugins.authomatic`
|
|
269
|
+
|
|
270
|
+
Releasing `pas.plugins.authomatic` is done using a combination of [zest.releaser](https://zestreleaser.readthedocs.io/) and [hatch](https://hatch.pypa.io/latest/).
|
|
271
|
+
|
|
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:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
.venv/bin/postrelease
|
|
301
|
+
```
|
|
302
|
+
|
|
245
303
|
## License
|
|
246
304
|
|
|
247
305
|
The project is licensed under the GPLv2.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from authomatic.exceptions import FetchError
|
|
2
2
|
from authomatic.providers import BaseProvider
|
|
3
3
|
from http import client as http_client
|
|
4
|
-
from pas.plugins.authomatic.
|
|
4
|
+
from pas.plugins.authomatic.log import logger
|
|
5
5
|
from urllib import parse
|
|
6
6
|
|
|
7
7
|
import authomatic.core
|
|
@@ -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",
|
|
@@ -177,6 +177,7 @@ package_dir = "src"
|
|
|
177
177
|
directory = "news/"
|
|
178
178
|
filename = "CHANGES.md"
|
|
179
179
|
start_string = "<!-- towncrier release notes start -->\n"
|
|
180
|
+
issue_format = "[#{issue}](https://github.com/collective/pas.plugins.authomatic/issues/{issue})"
|
|
180
181
|
title_format = "## {version} ({project_date})"
|
|
181
182
|
template = "news/.changelog_template.jinja"
|
|
182
183
|
underlines = ["", "", ""]
|
|
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.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/meta.zcml
RENAMED
|
File without changes
|
|
File without changes
|
{pas.plugins.authomatic-2.0.0b1 → 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.0b1 → 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.0b1 → pas.plugins.authomatic-2.0.0b3}/pas/plugins/authomatic/utils.py
RENAMED
|
File without changes
|