Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor account recovery #309

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ This project features:

## Logion API

### Protection requests

Request IDs are randomly generated upon creation. Please note down the request ID you get on creation in order to use
it as a path variable in the other queries.

- Create: `curl -v http://127.0.0.1:8088/api/protection-request -H "Content-Type: application/json" -d @sample-data/create.json | jq`
- Fetch by requester: `curl -vX PUT http://127.0.0.1:8088/api/protection-request -H "Content-Type: application/json" -d @sample-data/fetch_pending_by_requester.json | jq`
- Fetch by legal officer: `curl -vX PUT http://127.0.0.1:8088/api/protection-request -H "Content-Type: application/json" -d @ sample-data/fetch_pending_by_legal_officer.json | jq`
- Reject: `curl -v http://127.0.0.1:8088/api/protection-request/<id>/reject -H "Content-Type: application/json" -d @sample-data/reject.json | jq`
- Accept: `curl -v http://127.0.0.1:8088/api/protection-request/<id>/accept -H "Content-Type: application/json" -d @sample-data/accept.json | jq`
- Check: `curl -v http://127.0.0.1:8088/api/protection-request/<id>/check-activation -H "Content-Type: application/json" -d @sample-data/check.json | jq`

### Authentication
Authentication process is described [here](doc/Authentication.md).

Expand Down
20 changes: 10 additions & 10 deletions resources/mail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ All possible variables are available (for copy/paste) in this template: [all-doc
legalOfficer.postalAddress.city
legalOfficer.postalAddress.country

In the context of a protection (or recovery), all the variables defined above may also be prefixed with
In the context of an account recovery, all the variables defined above may also be prefixed with
`otherLegalOfficer` instead of `legalOfficer`.

### Protection and Recovery Request
protection.requesterAddress
protection.otherLegalOfficerAddress
protection.addressToRecover
protection.createdOn
protection.isRecovery
### Recovery Request
recovery.requesterAddress
recovery.otherLegalOfficerAddress
recovery.addressToRecover
recovery.createdOn
recovery.isRecovery

protection.decision.decisionOn
protection.decision.rejectReason
protection.decision.locId
recovery.decision.decisionOn
recovery.decision.rejectReason
recovery.decision.locId

### LOC
loc.id
Expand Down
17 changes: 8 additions & 9 deletions resources/mail/all-documented-vars.pug
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@
| #{otherLegalOfficer.postalAddress.city};
| #{otherLegalOfficer.postalAddress.country};
|
| === Protection ===
| #{protection.requesterAddress.address};
| #{protection.otherLegalOfficerAddress};
| #{protection.addressToRecover};
| #{protection.createdOn};
| #{protection.isRecovery};
| === Account Recovery ===
| #{recovery.requesterAddress.address};
| #{recovery.otherLegalOfficerAddress};
| #{recovery.addressToRecover};
| #{recovery.createdOn};
|
| #{protection.decision.decisionOn};
| #{protection.decision.rejectReason};
| #{protection.decision.locId};
| #{recovery.decision.decisionOn};
| #{recovery.decision.rejectReason};
| #{recovery.decision.locId};
|
| === LOC ===
| #{loc.id};
Expand Down
30 changes: 0 additions & 30 deletions resources/mail/protection-accepted.pug

This file was deleted.

33 changes: 0 additions & 33 deletions resources/mail/protection-cancelled.pug

This file was deleted.

16 changes: 0 additions & 16 deletions resources/mail/protection-rejected.pug

This file was deleted.

33 changes: 0 additions & 33 deletions resources/mail/protection-requested.pug

This file was deleted.

33 changes: 0 additions & 33 deletions resources/mail/protection-resubmitted.pug

This file was deleted.

52 changes: 0 additions & 52 deletions resources/mail/protection-updated.pug

This file was deleted.

6 changes: 3 additions & 3 deletions resources/mail/recovery-accepted.pug
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
|
| Please note, you can't answer this email. The logion network will never ask you to provide any kind of information or access to a web address through its email notifications.
|
| One of your Legal Officers, #{legalOfficer.userIdentity.firstName} #{legalOfficer.userIdentity.lastName}, has accepted to let you recover all digital assets from your Polkadot account set as follows: #{protection.requesterAddress.address}.
| One of your Legal Officers, #{legalOfficer.userIdentity.firstName} #{legalOfficer.userIdentity.lastName}, has accepted to let you recover all digital assets from your Polkadot account set as follows: #{recovery.requesterAddress.address}.
|
| As a reminder, find below all details of the Legal Officer who accepted this request:
|
include /legal-officer-details.pug
|
| Upon acceptance of both selected Legal Officers, you will be able, from the "Recovery" section of your wallet, to:
| * activate the protection of your new account by the same Legal Officers
| * recover all digital assets from your previous account (#{protection.addressToRecover}) by transfering them to the new one
| * activate the recovery of your new account by the same Legal Officers
| * recover all digital assets from your previous account (#{recovery.addressToRecover}) by transfering them to the new one
|
include /footer.pug
4 changes: 2 additions & 2 deletions resources/mail/recovery-cancelled.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
|
| Identification key to recover:
| ***********************************
| #{protection.addressToRecover}
| #{recovery.addressToRecover}
|
| New Identification key:
| **************************
| #{protection.requesterAddress.address}
| #{recovery.requesterAddress.address}
|
| Email:
| *******
Expand Down
6 changes: 3 additions & 3 deletions resources/mail/recovery-rejected.pug
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| logion notification - Recovery request refusal
| Dear #{walletUser.firstName} #{walletUser.lastName},
|
| You receive this message because you are requesting a recovery process from a Legal Officer through the logion blockchain network.
| You receive this message because you are requesting an account recovery from a Legal Officer through the logion blockchain network.
| Please note, you can't answer this email. The logion network will never ask you to provide any kind of information or access to a web address through its email notifications.
|
| One of your Legal Officers, #{legalOfficer.userIdentity.firstName} #{legalOfficer.userIdentity.lastName}, has refused to let you recover assets from the Polkadot account you mentioned in your request (#{protection.requesterAddress.address}) for the following reason:
| #{protection.decision.rejectReason}
| One of your Legal Officers, #{legalOfficer.userIdentity.firstName} #{legalOfficer.userIdentity.lastName}, has refused to let you recover assets from the Polkadot account you mentioned in your request (#{recovery.requesterAddress.address}) for the following reason:
| #{recovery.decision.rejectReason}
|
| As a reminder, find below all details of the Legal Officer who refused this request:
|
Expand Down
4 changes: 2 additions & 2 deletions resources/mail/recovery-requested.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
|
| Identification key to recover:
| ***********************************
| #{protection.addressToRecover}
| #{recovery.addressToRecover}
|
| New Identification key:
| **************************
| #{protection.requesterAddress.address}
| #{recovery.requesterAddress.address}
|
| Email:
| *******
Expand Down
37 changes: 0 additions & 37 deletions resources/mail/recovery-resubmitted.pug

This file was deleted.

Loading
Loading