feat: added session guid and token type fields to jwt tokens;

feat: very minimal implementation of registration functions;
refactor: login function now uses the transactional db helper function and creates a session;
feat: enum for jwt token type
This commit is contained in:
2025-07-01 14:17:50 +03:00
parent 284d959bc3
commit 96e41efdec
4 changed files with 196 additions and 23 deletions

View File

@@ -34,6 +34,8 @@ type Claims struct {
jwt.RegisteredClaims
}
// TODO: validate token type
// TODO: validate session guid
func AuthMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
cfg := config.GetConfig()