added auth validate route

This commit is contained in:
2025-01-28 18:09:26 +01:00
parent f7efee56f0
commit 86c43fffc0
4 changed files with 31 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
package model
import "github.com/golang-jwt/jwt/v5"
type LoginStruct struct {
Username string `json:"username" xml:"username" form:"username"`
Password string `json:"password" xml:"password" form:"password"`
@@ -9,3 +11,9 @@ type SignupStruct struct {
Username string `json:"username" xml:"username" form:"username"`
Password string `json:"password" xml:"password" form:"password"`
}
type UserClaims struct {
Username string `json:"username"`
UserId string `json:"user_id"`
jwt.RegisteredClaims
}