Commit graph

7 commits

Author SHA1 Message Date
Ivan R. e24a3a754c
Update token cookie max age 2023-07-22 21:02:54 +05:00
Ivan R. 292df39bb8
Change path to API.
This helps you understand which paths return pages and which paths process forms.
2023-07-22 20:59:40 +05:00
Ivan R. de76c90f3c
Rename 'backend' module to 'database' 2023-07-22 15:24:01 +05:00
Ivan R. 2c08171c7a
Start using JWT tokens
I thought this was a good idea.
Pros: fewer database calls.
Cons: there is no way to revoke the token (except for changing the secret key).

I rewrote the authorization as a middleware. Request handlers no longer need to validate the user.
2023-07-22 13:42:43 +05:00
Ivan R. 16095e0254
Interrupt the execution of functions if the user is not authorized 2023-04-09 10:41:21 +05:00
Ivan R. c92fa6e9e0
Format code with go fmt 2023-04-06 10:37:48 +05:00
Ivan R. 16cd7aa635
Initial commit 2023-04-06 10:36:11 +05:00