Skip to content

Commit 33137ad

Browse files
authored
Merge pull request #56 from collective/resect_otp_logics
Resect email otp logics
2 parents c5aedc5 + 6d8b06d commit 33137ad

File tree

19 files changed

+190
-904
lines changed

19 files changed

+190
-904
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Changelog
1313
- Configurable header and footer for email message.
1414
[folix-01]
1515
- Subject templating
16+
- Remove otp logics (moved to collective.volto.otp)
1617
[folix-01]
1718
- Handle the edge cases where the `blocks` attribute is not set.
1819
[mamico]

README.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,6 @@ Optional parameters could be passed in the payload:
106106
* `block_id` to delete only data related to a specific block on the page, otherwise data from all form blocks on the page will be deleted
107107
* `expired` a boolean that, if `true`, removes only records older than the value of days specified in the block configuration (the above `block_id` parameter is required)
108108

109-
@validate-email-address
110-
-----------------------
111-
112-
Send an message to the passed email with OTP code to verify the address.
113-
Returns a HTTP 204 in case of success or HTTP 400 in case the email is badly composed.::
114-
115-
> curl -i -X POST http://localhost:8080/Plone/my-form/@validate-email-address --data-raw '{"email": "email@email.com", "uid": "ffffffff"}' -H 'Accept: application/json' -H 'Content-Type: application/json'
116-
117-
parameters:
118-
119-
* `email` email address.
120-
* `uid` uid related to email field
121-
122-
@validate-email-token
123-
---------------------
124-
125-
Supposed to validate the OTP code received by the user via email.
126-
Returns HTTP 204 in case of success or HTTP 400 in case of failure ::
127-
128-
> curl -i -X POST http://localhost:8080/Plone/my-form/@validate-email-token --data-raw '{"email": "email@email.com", "otp": "blahblahblah"}' -H 'Accept: application/json' -H 'Content-Type: application/json'
129-
130-
parameters:
131-
132-
* `email` email address
133-
* `uid` uid used to generate the OTP
134-
* `otp` OTP code
135-
136109
Form actions
137110
============
138111

base.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ eggs =
3333
Plone
3434
Pillow
3535
collective.volto.formsupport [test]
36-
plone.keyring
3736

3837
zcml-additional +=
3938
<configure xmlns="http://namespaces.zope.org/zope"
@@ -126,7 +125,7 @@ scripts =
126125
[versions]
127126
# Don't use a released version of collective.volto.formsupport
128127
collective.volto.formsupport =
129-
setuptools =
128+
setuptools =
130129

131130
[sources]
132131

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"Zope",
5858
"plone.api>=1.8.4",
5959
"plone.dexterity",
60-
"plone.keyring",
6160
"plone.i18n",
6261
"plone.memoize",
6362
"plone.protect",
@@ -69,7 +68,7 @@
6968
"souper.plone",
7069
"click",
7170
"beautifulsoup4",
72-
"pyotp",
71+
"collective.volto.otp",
7372
],
7473
extras_require={
7574
"hcaptcha": [

src/collective/volto/formsupport/browser/configure.zcml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,5 @@
3434
template="send_mail_template_table.pt"
3535
permission="zope2.View"
3636
/>
37-
<browser:page
38-
name="email-confirm-view"
39-
for="*"
40-
class=".email_confirm_view.EmailConfirmView"
41-
template="templates/email_confirm_view.pt"
42-
permission="zope2.View"
43-
layer="collective.volto.formsupport.interfaces.ICollectiveVoltoFormsupportLayer"
44-
/>
4537

4638
</configure>

src/collective/volto/formsupport/browser/email_confirm_view.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)