Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
func GenerateToken(claim CustomClaims, secret string) (string, error)
Types ¶
type CustomClaims ¶
type CustomClaims struct {
Category string `json:"category"`
Id string `json:"id"`
Issuer string `json:"issuer"`
jwt.RegisteredClaims
}
func NewCustomClaims ¶
func NewCustomClaims(category, id, issuer, validDuration string) CustomClaims
func VerifyToken ¶
func VerifyToken(tokenString string, secret string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.