nextcore
nextcore copied to clipboard
Basic endpoint interactions request verifier
Issues:
- [x] No tests
- [ ] Doesn't give you info about what part it failed at, it is only logged.
Why not just use a exception like pynacl does?
I personally prefer:
# This
if not REQUEST_VERIFIER.is_valid(...):
return {"detail": "Go away"}, 400
# Over this
try:
REQUEST_VERIFIER.verify(...):
except BaseVerificationError:
return {"detail": "Go away"}, 400
However I am still unsure.
This is based on and superseeds #255