Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
func GenerateToken(claims CustomClaims, signingKey string) (string, error)
Types ¶
type CustomClaims ¶
type CustomClaims struct { ID uint `json:"id"` Emial string `json:"email"` Role string `json:"role"` jwt.StandardClaims }
func VerifyToken ¶
func VerifyToken(tokenString string, signingKey string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.