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

Add endpoints to request nonce and message to sign #10

Merged
merged 7 commits into from
Aug 2, 2024

Conversation

falvaradorodriguez
Copy link
Contributor

@falvaradorodriguez falvaradorodriguez commented Jul 31, 2024

Closes #3

Two endpoints are included:

  • An endpoint that returns a valid nonce for the user to generate their ERC-4361 message.
  • An endpoint that generates a valid ERC-4361 message with the embedded nonce.

For the configuration, pydantic is used following the FastApi recommendation https://fastapi.tiangolo.com/advanced/settings/#settings-in-another-module.

The same way is also used for the validation of the model fields.

A Redis service is added to the project to manage the nonce cache.

@falvaradorodriguez falvaradorodriguez self-assigned this Jul 31, 2024
@falvaradorodriguez falvaradorodriguez force-pushed the add-endpoint-request-nonce branch 4 times, most recently from 68bd502 to 6300497 Compare July 31, 2024 19:46
@safe-global safe-global deleted a comment from coveralls Jul 31, 2024
@falvaradorodriguez falvaradorodriguez force-pushed the add-endpoint-request-nonce branch 2 times, most recently from 02c7462 to 317d82c Compare August 1, 2024 07:23
@falvaradorodriguez falvaradorodriguez force-pushed the add-endpoint-request-nonce branch from 317d82c to 8588264 Compare August 1, 2024 07:27
@falvaradorodriguez falvaradorodriguez marked this pull request as ready for review August 1, 2024 07:45
@falvaradorodriguez falvaradorodriguez requested a review from a team as a code owner August 1, 2024 07:45
app/main.py Outdated Show resolved Hide resolved
app/siwe/message_service.py Outdated Show resolved Hide resolved
app/siwe/nonce_repository.py Outdated Show resolved Hide resolved
app/tests/test_router_about.py Outdated Show resolved Hide resolved
app/tests/test_siwe_message_service.py Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
docker/web/Dockerfile Outdated Show resolved Hide resolved
requirements/prod.txt Outdated Show resolved Hide resolved
@falvaradorodriguez falvaradorodriguez merged commit c9d9172 into main Aug 2, 2024
5 checks passed
@falvaradorodriguez falvaradorodriguez deleted the add-endpoint-request-nonce branch August 2, 2024 10:40
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POC: Add endpoint to request message to sign
2 participants