pas.plugins.authomatic 1.2.0__tar.gz → 2.0.0b2__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 (88) hide show
  1. pas.plugins.authomatic-2.0.0b2/.gitignore +18 -0
  2. {pas.plugins.authomatic-1.2.0 → pas.plugins.authomatic-2.0.0b2}/PKG-INFO +116 -195
  3. {pas.plugins.authomatic-1.2.0 → pas.plugins.authomatic-2.0.0b2}/README.md +110 -28
  4. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/__init__.py +17 -6
  5. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/controlpanel.py +1 -2
  6. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/view.py +19 -7
  7. pas.plugins.authomatic-2.0.0b2/pas/plugins/authomatic/integration/__init__.py +8 -0
  8. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/integration/restapi.py +1 -3
  9. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/interfaces.py +1 -2
  10. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/de/LC_MESSAGES/pas.plugins.authomatic.po +24 -16
  11. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/es/LC_MESSAGES/pas.plugins.authomatic.po +28 -20
  12. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po +24 -16
  13. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po +24 -16
  14. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +24 -16
  15. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po +25 -17
  16. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po +43 -26
  17. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/update.py +6 -1
  18. pas.plugins.authomatic-2.0.0b2/pas/plugins/authomatic/log.py +6 -0
  19. pas.plugins.authomatic-2.0.0b2/pas/plugins/authomatic/patches/__init__.py +5 -0
  20. pas.plugins.authomatic-2.0.0b2/pas/plugins/authomatic/patches/authomatic.py +151 -0
  21. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/plugin.py +34 -20
  22. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/services/authomatic.py +18 -10
  23. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/services/login.py +7 -11
  24. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/testing.py +15 -18
  25. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/useridentities.py +1 -1
  26. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/useridfactories.py +0 -3
  27. pas.plugins.authomatic-2.0.0b2/pyproject.toml +275 -0
  28. pas.plugins.authomatic-1.2.0/.coveragerc +0 -7
  29. pas.plugins.authomatic-1.2.0/.editorconfig +0 -36
  30. pas.plugins.authomatic-1.2.0/CHANGELOG.md +0 -161
  31. pas.plugins.authomatic-1.2.0/CONTRIBUTORS.md +0 -3
  32. pas.plugins.authomatic-1.2.0/MANIFEST.in +0 -5
  33. pas.plugins.authomatic-1.2.0/Makefile +0 -116
  34. pas.plugins.authomatic-1.2.0/docs/authomatic.svg +0 -18
  35. pas.plugins.authomatic-1.2.0/docs/plone-control-panel.png +0 -0
  36. pas.plugins.authomatic-1.2.0/docs/plugin-settings.png +0 -0
  37. pas.plugins.authomatic-1.2.0/pyproject.toml +0 -44
  38. pas.plugins.authomatic-1.2.0/requirements.txt +0 -1
  39. pas.plugins.authomatic-1.2.0/setup.cfg +0 -4
  40. pas.plugins.authomatic-1.2.0/setup.py +0 -74
  41. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/integration/__init__.py +0 -2
  42. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/__init__.py +0 -0
  43. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/mocks.py +0 -27
  44. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_browser_controlpanel.py +0 -75
  45. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_plugin.py +0 -109
  46. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_services_authomatic.py +0 -53
  47. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_services_login.py +0 -28
  48. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_setup.py +0 -43
  49. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_setuphandler.py +0 -48
  50. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_upgrades.py +0 -39
  51. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_useridentities.py +0 -156
  52. pas.plugins.authomatic-1.2.0/src/pas/plugins/authomatic/tests/test_useridfactories.py +0 -26
  53. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/PKG-INFO +0 -422
  54. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/SOURCES.txt +0 -80
  55. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/dependency_links.txt +0 -1
  56. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/entry_points.txt +0 -5
  57. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/namespace_packages.txt +0 -2
  58. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/not-zip-safe +0 -1
  59. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/requires.txt +0 -12
  60. pas.plugins.authomatic-1.2.0/src/pas.plugins.authomatic.egg-info/top_level.txt +0 -1
  61. {pas.plugins.authomatic-1.2.0 → pas.plugins.authomatic-2.0.0b2}/LICENSE.txt +0 -0
  62. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/__init__.py +0 -0
  63. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/__init__.py +0 -0
  64. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/__init__.py +0 -0
  65. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
  66. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/authomatic.png +0 -0
  67. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/authomatic.pt +0 -0
  68. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/configure.zcml +0 -0
  69. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
  70. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
  71. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
  72. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/configure.zcml +0 -0
  73. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/integration/zope.py +0 -0
  74. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/__init__.py +0 -0
  75. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
  76. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/meta.zcml +0 -0
  77. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
  78. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
  79. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
  80. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
  81. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
  82. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
  83. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
  84. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/profiles.zcml +0 -0
  85. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/services/__init__.py +0 -0
  86. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/services/configure.zcml +0 -0
  87. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/setuphandlers.py +0 -0
  88. {pas.plugins.authomatic-1.2.0/src → pas.plugins.authomatic-2.0.0b2}/pas/plugins/authomatic/utils.py +0 -0
@@ -0,0 +1,18 @@
1
+ !src/pas
2
+ .coverage*
3
+ .pydevproject
4
+ .pytest_cache
5
+ .ruff_cache
6
+ .python-version
7
+ .venv
8
+ *.egg-info
9
+ *.log
10
+ *.mo
11
+ *.pyc
12
+ *.swp
13
+ constraints-mxdev.txt
14
+ constraints.txt
15
+ instance
16
+ requirements-mxdev.txt
17
+ requirements.lock
18
+ requirements.txt
@@ -1,36 +1,40 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pas.plugins.authomatic
3
- Version: 1.2.0
3
+ Version: 2.0.0b2
4
4
  Summary: Provides OAuth2/OpenID login for Plone using Authomatic.
5
- Home-page: https://github.com/collective/pas.plugins.authomatic
6
- Author: Jens Klein, Matthias Dollfuss, and Érico Andrei
7
- Author-email: dev@bluedynamics.com
8
- License: GPL
9
- Project-URL: Repository, https://github.com/collective/pas.plugins.authomatic/
10
5
  Project-URL: Changelog, https://github.com/collective/pas.plugins.authomatic/blob/main/CHANGELOG.md
6
+ Project-URL: Homepage, https://github.com/collective/pas.plugins.authomatic
11
7
  Project-URL: Issues, https://github.com/collective/pas.plugins.authomatic/issues
12
- Keywords: Python Plone PAS OAuth Authentication
8
+ Project-URL: Repository, https://github.com/collective/pas.plugins.authomatic/
9
+ Author: Matthias Dollfuss
10
+ Author-email: Jens Klein <dev@bluedynamics.com>, Érico Andrei <ericof@plone.org>
11
+ License: GNU General Public License v2 (GPLv2)
12
+ License-File: LICENSE.txt
13
+ Keywords: Authentication,OAuth,PAS,Plone,Python
13
14
  Classifier: Development Status :: 5 - Production/Stable
14
15
  Classifier: Environment :: Web Environment
15
- Classifier: Framework :: Plone :: 5.2
16
+ Classifier: Framework :: Plone
16
17
  Classifier: Framework :: Plone :: 6.0
18
+ Classifier: Framework :: Plone :: 6.1
17
19
  Classifier: Framework :: Plone :: Addon
18
- Classifier: Framework :: Plone
19
- Classifier: Framework :: Zope :: 5
20
20
  Classifier: Framework :: Zope
21
+ Classifier: Framework :: Zope :: 5
21
22
  Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
23
+ Classifier: Programming Language :: Python
22
24
  Classifier: Programming Language :: Python :: 3 :: Only
23
- Classifier: Programming Language :: Python :: 3.7
24
- Classifier: Programming Language :: Python :: 3.8
25
- Classifier: Programming Language :: Python :: 3.9
26
- Classifier: Programming Language :: Python :: 3.10
27
25
  Classifier: Programming Language :: Python :: 3.11
28
- Classifier: Programming Language :: Python
29
- Requires-Python: >=3.7
30
- Description-Content-Type: text/markdown
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Requires-Python: >=3.11
28
+ Requires-Dist: authomatic>=1.3.0
29
+ Requires-Dist: plone-restapi
30
+ Requires-Dist: products-cmfplone>=6.0
31
31
  Provides-Extra: test
32
- License-File: LICENSE.txt
33
-
32
+ Requires-Dist: collective-mockmailhost; extra == 'test'
33
+ Requires-Dist: plone-app-robotframework[debug]; extra == 'test'
34
+ Requires-Dist: plone-app-testing; extra == 'test'
35
+ Requires-Dist: plone-restapi[test]; extra == 'test'
36
+ Requires-Dist: zest-releaser[recommended]; extra == 'test'
37
+ Description-Content-Type: text/markdown
34
38
 
35
39
  <div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
36
40
 
@@ -56,8 +60,7 @@ License-File: LICENSE.txt
56
60
 
57
61
  </div>
58
62
 
59
- Features
60
- --------
63
+ ## Features
61
64
 
62
65
  **pas.plugins.authomatic** provides OAuth2 and OpenID login capability for Plone sites by integrating the awesome [Authomatic](https://authomatic.github.io/authomatic/) package.
63
66
 
@@ -72,12 +75,11 @@ through standards like OAuth and OpenID.
72
75
  *by author Peter Hudec on Authomatic website*
73
76
 
74
77
 
75
- Supported Providers
76
- -------------------
78
+ ### Supported Providers
77
79
 
78
80
  Out of the box, **pas.plugins.authomatic** supports the following providers
79
81
 
80
- *OAuth 1.0a*
82
+ #### OAuth 1.0
81
83
 
82
84
  - Bitbucket
83
85
  - Flickr
@@ -91,7 +93,7 @@ Out of the box, **pas.plugins.authomatic** supports the following providers
91
93
  - Xing
92
94
  - Yahoo
93
95
 
94
- *OAuth 2.0*
96
+ #### OAuth 2.0
95
97
 
96
98
  - Amazon
97
99
  - Behance
@@ -112,33 +114,58 @@ Out of the box, **pas.plugins.authomatic** supports the following providers
112
114
  - Yammer
113
115
  - Yandex
114
116
 
115
- *OpenID*
117
+ #### OpenID
116
118
 
117
119
  - python-openid
118
120
  - Google App Engine based OpenID.
119
121
 
120
122
 
121
- Documentation
122
- -------------
123
+ ## Documentation
123
124
 
124
125
  This package supports Plone sites using Volto or the Classic UI.
125
126
 
126
- For the Classic UI:
127
-
128
- - This package creates a view called `authomatic-handler` where you can login with different providers.
129
- - The view can be used as well to add an identity from a provider to an existing account.
130
- - The provider is choosen in the URL so if you call `/authomatic-handler/PROVIDER` you will use PROVIDER to login.
131
-
132
- For Volto:
127
+ ### Volto Frontend
133
128
 
134
129
  - Endpoint `@login` with GET: Returns list of authentication options
135
130
  - Endpoint `@login-authomatic` with GET: Provide information to start the OAuth process.
136
131
  - Endpoint `@login-authomatic` with POST: Handles OAuth login and returns a JSON web token (JWT).
137
132
  - For Volto sites you must also install [@plone-collective/volto-authomatic](https://github.com/collective/volto-authomatic).
133
+ - Plugin configuration is available in the Control-panel `/controlpanel/authomatic` (linked under users)
134
+ - Example JSON configuration (first level key is the PROVIDER):
135
+
136
+ ```json
137
+ {
138
+ "github": {
139
+ "display": {
140
+ "title": "Github",
141
+ "cssclasses": {
142
+ "button": "plone-btn plone-btn-default",
143
+ "icon": "glypicon glyphicon-github"
144
+ },
145
+ "as_form": false
146
+ },
147
+ "propertymap": {
148
+ "email": "email",
149
+ "link": "home_page",
150
+ "location": "location",
151
+ "name": "fullname"
152
+ },
153
+ "class_": "authomatic.providers.oauth2.GitHub",
154
+ "consumer_key": "5c4901d141e736f114a7",
155
+ "consumer_secret": "d4692ca3c0ab6cc1f8b28d3ccb1ea15b61e7ef5c",
156
+ "access_headers": {
157
+ "User-Agent": "Plone Authomatic Plugin"
158
+ }
159
+ },
160
+ }
161
+ ```
138
162
 
139
163
 
140
- Configuration is, currently, done via Classic UI:
164
+ ### Classic UI
141
165
 
166
+ - This package creates a view called `authomatic-handler` where you can login with different providers.
167
+ - The view can be used as well to add an identity from a provider to an existing account.
168
+ - The provider is choosen in the URL so if you call `/authomatic-handler/PROVIDER` you will use PROVIDER to login.
142
169
  - Plugin configuration is available in the Controlpanel `@@authomatic-controlpanel` (linked under users)
143
170
  - Example JSON configuration (first level key is the PROVIDER):
144
171
 
@@ -169,8 +196,7 @@ Configuration is, currently, done via Classic UI:
169
196
  }
170
197
  ```
171
198
 
172
- Installation
173
- ------------
199
+ ## Installation
174
200
 
175
201
  Add **pas.plugins.authomatic** to the Plone installation using `pip`:
176
202
 
@@ -190,8 +216,7 @@ or add it as a dependency on your package's `setup.py`
190
216
 
191
217
  Start Plone and activate the plugin in the addons control-panel.
192
218
 
193
- Configuration
194
- -------------
219
+ ## Configuration
195
220
 
196
221
  Using Classic UI, go to the `Authomatic` controlpanel.
197
222
 
@@ -217,8 +242,7 @@ There are some differences in configuration:
217
242
  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.
218
243
 
219
244
 
220
- Source Code and Contributions
221
- -----------------------------
245
+ ## Source Code and Contributions
222
246
 
223
247
  If you want to help with the development (improvement, update, bug-fixing, ...) of `pas.plugins.authomatic` this is a great idea!
224
248
 
@@ -232,15 +256,14 @@ Creator of **pas.plugins.authomatic** is Jens Klein.
232
256
 
233
257
  We appreciate any contribution and if a release is needed to be done on PyPI, please just contact one of us.
234
258
 
235
- Development
236
- -----------
259
+ ### Development
237
260
 
238
261
  You need a working `python` environment (system, virtualenv, pyenv, etc) version 3.7 or superior.
239
262
 
240
263
  Then install the dependencies and a development instance using:
241
264
 
242
265
  ```bash
243
- make build
266
+ make install
244
267
  ```
245
268
 
246
269
  To run tests for this package:
@@ -249,174 +272,72 @@ To run tests for this package:
249
272
  make test
250
273
  ```
251
274
 
252
- By default we use the latest Plone version in the 6.x series.
253
-
254
- License
255
- -------
256
-
257
- The project is licensed under the GPLv2.
258
-
259
-
260
- # Changelog
261
-
262
- ## 1.2.0 (2023-09-13)
263
-
264
- - Add Spanish translation. @macagua
265
-
266
- - Better handle values from identity data. @cekk
267
-
268
- - Add `username_userid` User ID factory. @ericof
269
-
270
- - Annotate transaction in POST calls to authenticate a user. @ericof
271
-
272
-
273
- ## 1.1.2 (2023-03-15)
274
-
275
- - Support Python 3.11 for Plone 6. @ericof
276
-
277
- - Lint fixes @ericof
278
-
279
-
280
- ## 1.1.1 (2022-10-14)
281
-
282
- - Upgrade plone/code-analysis-action to version 2. @ericof
283
-
284
- - Fix packaging issue related to CHANGELOG.md not being included in the source package. @ericof
285
-
286
- - Support Python 3.10 for Plone 6. @ericof
287
-
288
-
289
- ## 1.1.0 (2022-10-10)
290
-
291
- - Add the plone.restapi adapter to show the controlpanel in Volto. @erral
292
-
293
- - Add possibility to redirect to `next_url` via provided cookie @avoinea
294
-
295
-
296
- ## 1.0.0 (2022-07-25)
297
-
298
- - Use plone/plone-setup GitHub Action. @ericof
299
-
300
- - Add Brazilian Portuguese translation. @ericof
301
-
302
- - Use plone/code-analysis-action GitHub Action for code analysis. @ericof
303
-
304
- - Fix doChangeUser takes 2 positional arguments but 3 were given @avoinea
305
-
306
- ## 1.0b2 (2021-08-18)
307
-
308
- - Fix tox setup, move CI from TravisCI to GitHub Actions. @jensens
309
-
310
- - Code Style Black, Isort, zpretty and Pyupgrade applied. @jensens
311
-
312
- - Add missing no-op methods for IUserManagement to plugin.
313
- This fixes the tests. @jensens
314
-
315
- - Drop Python 2 support and so require Plone 5.2. @jensens
316
-
317
- - Include permissions from CMFCore to avoid ComponentLookupError. @bsuttor
318
-
319
- - Fixed ModuleNotFoundError: No module named 'App.class_init' on Zope 5. @bsuttor
320
-
321
- - Add french translation @mpeeters
322
-
323
- - PAS event notification IPrincipalCreatedEvent. @jensens
324
-
325
- - Python 3 and Plone 52 compatibility. @cekk
326
-
327
- - Fix #44: Fullfill strictly exact_match when enumerating users @allusa
328
-
329
- - Allow users deletion. @cekk
330
-
331
- - Drop Plone < 5.1.x compatibility. @cekk
332
-
333
- - Fix #54: Notification of PrincipalCreated event. @ericof
334
-
335
- - Closes #55: Support plone.restapi. @ericof
336
-
337
- ## 1.0b1 (2017-11-20)
338
-
339
- - Slighly beautify login modal. @jensens
340
-
341
- - Fix #33" Page does not exist Control Settings. @jensens
342
-
343
- - Fix #31: Link is broken to JSON configuration documentation in help text. @jensens
344
-
345
- - Fix #28: After uninstall plone.external_login_url is still registered and the login broken. @jensens
346
-
347
- - Support for Plone 5.1 tested (worked, ust control-panel icon needed some tweak).
348
- Buildout configuration for 5.1 added. @jensens
349
-
350
- - Install: Hide non-valid profiles at install form. @jensens
351
-
352
- - Additional checks to ensure to never have an empty/None key stored. @jensens
353
-
354
- - Fix #27: Update user data after login. @jensens
355
-
356
- - Fix filter users bug in enumerateUsers plugin where it was always returning
357
- all the users. @sneridagh
358
-
359
- - fix typo and wording of login message @tkimnguyen
360
-
361
-
362
- ## 1.0a7 (2016-02-15)
363
-
364
- - Workaround for None users. @sneridagh
365
-
366
-
367
- ## 1.0a6 (2016-01-11)
368
-
369
- - Fix #21: When you logout and then login again, a new user is created. @jensens
370
-
371
-
372
- ## 1.0a5 (2015-12-04)
373
-
374
- - Fix: #18 "Provider Login" option for "Generator for Plone User ID" seems
375
- broken @jensens
376
-
377
- - Fix: Title indicates if an identity is added @jensens
378
-
379
- - Fix: Correct usage of plone.protect @jensens
275
+ To lint the codebase:
380
276
 
277
+ ```bash
278
+ make lint
279
+ ```
381
280
 
382
- ## 1.0a4 (2015-11-20)
281
+ By default we use the latest Plone version in the 6.x series.
383
282
 
384
- - Added german translation @jensens
283
+ ### Changelog entries
385
284
 
386
- - Restored Plone 4 compatibility @keul
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:
387
286
 
388
- - Added italian translation @keul
287
+ * It avoids merge conflicts in CHANGES.md.
288
+ * It avoids news entries ending up under the wrong version header.
389
289
 
390
- - Proper uninstall @keul
290
+ The best way of adding news entries is this:
391
291
 
392
- ## 1.0a3 (2015-11-15)
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.
393
293
 
394
- - Refactor authomatic-handler to enable adding identities. @jensens
294
+ * Create a file inside of the news/ directory, named after that issue number:
395
295
 
396
- - Fix: use secret from settings as secret for Authomatic. @jensens
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.
397
301
 
398
- - Renamed view ``authomatic-login`` to ``authomatic-handler``, because this
399
- view will be used to add an identity too (url must be registered on provider
400
- side sometimes and we want to do this only once). @jensens
302
+ * The contents of this file should be markdown formatted text that will be used as the content of the CHANGES.md entry.
401
303
 
304
+ Towncrier will automatically add a reference to the issue when rendering the CHANGES.md file.
402
305
 
403
- ## 1.0a2 (2015-11-14)
306
+ ### Releasing `pas.plugins.authomatic`
404
307
 
405
- - Minimal validation of JSON. @jensens
308
+ Releasing `pas.plugins.authomatic` is done using a combination of [zest.releaser](https://zestreleaser.readthedocs.io/) and [hatch](https://hatch.pypa.io/latest/).
406
309
 
407
- - Make the whole ``remember`` procedure a ``safeWrite`` if called from login
408
- view. We can not pass a authenticator token here, because of redirects and
409
- expected return urls . @jensens
310
+ The release process consists of three steps: **Pre-release**, **Release**, and **Post-release**.
410
311
 
411
- - Allow selection of user id generator strategy. @jensens
312
+ #### Pre-release
313
+ Run the following command to populate the `CHANGES.md` file with the entries available in the `news/` directory:
412
314
 
413
- - Allow multiple services for one user. This changes a lot behind the scenes. @jensens
315
+ ```bash
316
+ .venv/bin/prerelease
317
+ ```
414
318
 
415
- - Use authomatic.core.User attributes instead of raw provider data. closes [#9](https://github.com/collective/pas.plugins.authomatic/issues/9) @ericof
319
+ #### Release
416
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
+ ```
417
333
 
418
- ## 1.0a1 (2015-10-28)
334
+ #### Post-release
335
+ Run the following command to bump the package version, create a new commit, and push all changes to GitHub:
419
336
 
420
- - Initial release.
337
+ ```bash
338
+ .venv/bin/postrelease
339
+ ```
421
340
 
341
+ ## License
422
342
 
343
+ The project is licensed under the GPLv2.
@@ -22,8 +22,7 @@
22
22
 
23
23
  </div>
24
24
 
25
- Features
26
- --------
25
+ ## Features
27
26
 
28
27
  **pas.plugins.authomatic** provides OAuth2 and OpenID login capability for Plone sites by integrating the awesome [Authomatic](https://authomatic.github.io/authomatic/) package.
29
28
 
@@ -38,12 +37,11 @@ through standards like OAuth and OpenID.
38
37
  *by author Peter Hudec on Authomatic website*
39
38
 
40
39
 
41
- Supported Providers
42
- -------------------
40
+ ### Supported Providers
43
41
 
44
42
  Out of the box, **pas.plugins.authomatic** supports the following providers
45
43
 
46
- *OAuth 1.0a*
44
+ #### OAuth 1.0
47
45
 
48
46
  - Bitbucket
49
47
  - Flickr
@@ -57,7 +55,7 @@ Out of the box, **pas.plugins.authomatic** supports the following providers
57
55
  - Xing
58
56
  - Yahoo
59
57
 
60
- *OAuth 2.0*
58
+ #### OAuth 2.0
61
59
 
62
60
  - Amazon
63
61
  - Behance
@@ -78,33 +76,58 @@ Out of the box, **pas.plugins.authomatic** supports the following providers
78
76
  - Yammer
79
77
  - Yandex
80
78
 
81
- *OpenID*
79
+ #### OpenID
82
80
 
83
81
  - python-openid
84
82
  - Google App Engine based OpenID.
85
83
 
86
84
 
87
- Documentation
88
- -------------
85
+ ## Documentation
89
86
 
90
87
  This package supports Plone sites using Volto or the Classic UI.
91
88
 
92
- For the Classic UI:
93
-
94
- - This package creates a view called `authomatic-handler` where you can login with different providers.
95
- - The view can be used as well to add an identity from a provider to an existing account.
96
- - The provider is choosen in the URL so if you call `/authomatic-handler/PROVIDER` you will use PROVIDER to login.
97
-
98
- For Volto:
89
+ ### Volto Frontend
99
90
 
100
91
  - Endpoint `@login` with GET: Returns list of authentication options
101
92
  - Endpoint `@login-authomatic` with GET: Provide information to start the OAuth process.
102
93
  - Endpoint `@login-authomatic` with POST: Handles OAuth login and returns a JSON web token (JWT).
103
94
  - For Volto sites you must also install [@plone-collective/volto-authomatic](https://github.com/collective/volto-authomatic).
95
+ - Plugin configuration is available in the Control-panel `/controlpanel/authomatic` (linked under users)
96
+ - Example JSON configuration (first level key is the PROVIDER):
97
+
98
+ ```json
99
+ {
100
+ "github": {
101
+ "display": {
102
+ "title": "Github",
103
+ "cssclasses": {
104
+ "button": "plone-btn plone-btn-default",
105
+ "icon": "glypicon glyphicon-github"
106
+ },
107
+ "as_form": false
108
+ },
109
+ "propertymap": {
110
+ "email": "email",
111
+ "link": "home_page",
112
+ "location": "location",
113
+ "name": "fullname"
114
+ },
115
+ "class_": "authomatic.providers.oauth2.GitHub",
116
+ "consumer_key": "5c4901d141e736f114a7",
117
+ "consumer_secret": "d4692ca3c0ab6cc1f8b28d3ccb1ea15b61e7ef5c",
118
+ "access_headers": {
119
+ "User-Agent": "Plone Authomatic Plugin"
120
+ }
121
+ },
122
+ }
123
+ ```
104
124
 
105
125
 
106
- Configuration is, currently, done via Classic UI:
126
+ ### Classic UI
107
127
 
128
+ - This package creates a view called `authomatic-handler` where you can login with different providers.
129
+ - The view can be used as well to add an identity from a provider to an existing account.
130
+ - The provider is choosen in the URL so if you call `/authomatic-handler/PROVIDER` you will use PROVIDER to login.
108
131
  - Plugin configuration is available in the Controlpanel `@@authomatic-controlpanel` (linked under users)
109
132
  - Example JSON configuration (first level key is the PROVIDER):
110
133
 
@@ -135,8 +158,7 @@ Configuration is, currently, done via Classic UI:
135
158
  }
136
159
  ```
137
160
 
138
- Installation
139
- ------------
161
+ ## Installation
140
162
 
141
163
  Add **pas.plugins.authomatic** to the Plone installation using `pip`:
142
164
 
@@ -156,8 +178,7 @@ or add it as a dependency on your package's `setup.py`
156
178
 
157
179
  Start Plone and activate the plugin in the addons control-panel.
158
180
 
159
- Configuration
160
- -------------
181
+ ## Configuration
161
182
 
162
183
  Using Classic UI, go to the `Authomatic` controlpanel.
163
184
 
@@ -183,8 +204,7 @@ There are some differences in configuration:
183
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.
184
205
 
185
206
 
186
- Source Code and Contributions
187
- -----------------------------
207
+ ## Source Code and Contributions
188
208
 
189
209
  If you want to help with the development (improvement, update, bug-fixing, ...) of `pas.plugins.authomatic` this is a great idea!
190
210
 
@@ -198,15 +218,14 @@ Creator of **pas.plugins.authomatic** is Jens Klein.
198
218
 
199
219
  We appreciate any contribution and if a release is needed to be done on PyPI, please just contact one of us.
200
220
 
201
- Development
202
- -----------
221
+ ### Development
203
222
 
204
223
  You need a working `python` environment (system, virtualenv, pyenv, etc) version 3.7 or superior.
205
224
 
206
225
  Then install the dependencies and a development instance using:
207
226
 
208
227
  ```bash
209
- make build
228
+ make install
210
229
  ```
211
230
 
212
231
  To run tests for this package:
@@ -215,9 +234,72 @@ To run tests for this package:
215
234
  make test
216
235
  ```
217
236
 
237
+ To lint the codebase:
238
+
239
+ ```bash
240
+ make lint
241
+ ```
242
+
218
243
  By default we use the latest Plone version in the 6.x series.
219
244
 
220
- License
221
- -------
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
+
303
+ ## License
222
304
 
223
305
  The project is licensed under the GPLv2.