nextcore icon indicating copy to clipboard operation
nextcore copied to clipboard

Basic endpoint interactions request verifier

Open TAG-Epic opened this issue 1 year ago • 0 comments

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

TAG-Epic avatar Jul 23 '23 01:07 TAG-Epic