mdidle ware set

This commit is contained in:
valitovgaziz
2024-08-12 08:49:04 +05:00
parent 32daac3a49
commit 5cbb3237e0
9 changed files with 51 additions and 4 deletions
+19
View File
@@ -0,0 +1,19 @@
package models
import (
"os"
"github.com/golang-jwt/jwt/v4"
)
var jwtKey = []byte(os.Getenv("SECRET_KEY"))
type Crenetials struct {
Email string `json:"email"`
Password string `json:"password"`
}
type Claims struct {
jwt.RegisteredClaims
Email string `json:"email"`
}
+1 -1
View File
@@ -8,4 +8,4 @@ type User struct {
Email string `json:"email" gorm:"type:string;index"`
Password string `json:"password" gorm:"type:string;index"`
Phone string `json:"phone" gorm:"type:string;index"`
}
}