Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSecretLen = errors.New("密钥长度不正确")
Functions ¶
This section is empty.
Types ¶
type Maker ¶
type Maker interface {
// CreateToken 生成Token
CreateToken(userID int64, expireDate time.Duration) (string, *Payload, error)
// VerifyToken 解析Token
VerifyToken(token string) (*Payload, error)
}
func NewPasetoMaker ¶
type PasetoMaker ¶
type PasetoMaker struct {
// contains filtered or unexported fields
}
func (*PasetoMaker) CreateToken ¶
func (*PasetoMaker) VerifyToken ¶
func (p *PasetoMaker) VerifyToken(token string) (*Payload, error)
Click to show internal directories.
Click to hide internal directories.