Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetSignKey ¶
func GetSignKey() string
func JwtAuth ¶
func JwtAuth() gin.HandlerFunc
func SetSignKey ¶
Types ¶
type CustomClaims ¶
type Jwt ¶
type Jwt struct {
SigningKey []byte
}
func (*Jwt) CreateToken ¶
func (j *Jwt) CreateToken(claim CustomClaims) (string, error)
func (*Jwt) ParseToken ¶
func (j *Jwt) ParseToken(tokenString string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.