add jwt token validation

This commit is contained in:
behrooz
2025-08-13 12:03:42 +03:30
parent 7200d913f6
commit 3834c84497
5 changed files with 41 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
return
}
expirationTime := time.Now().Add(15 * time.Minute)
expirationTime := time.Now().Add(120 * time.Minute)
claims := &Claims{
Username: creds.Username,
RegisteredClaims: jwt.RegisteredClaims{