JSON Web Tokens (jwt) are an open, industry standard method for representing claims securely between two parties.
This was accomplished with the library djwt.
This uses sha256 hashed password salted with an env variable.
Encryption is provided by the library hmac
Instead of express used with node, I chose the oak web framework.
This was an experiment to port an existing node project to deno.
I'm quite happy with how it came out, and I hope you can enjoy it as well :^).
Deno is secure by default, so it's required to add some flags:
deno --allow-net --allow-read --allow-write --allow-env server.ts