Documentation
¶
Index ¶
Constants ¶
View Source
const ( RefreshTokenType = "refresh" AccessTokenType = "access" )
Variables ¶
View Source
var ( ErrExpiredToken = errors.New("token has expired") ErrInvalidToken = errors.New(("token is invalid")) )
Functions ¶
This section is empty.
Types ¶
type JWTMaker ¶
type JWTMaker struct {
// contains filtered or unexported fields
}
func (*JWTMaker) CreateToken ¶
type Maker ¶
type Maker interface {
CreateToken(userId int32, duration time.Duration, tokenType string) (string, *Payload, error)
VerifyToken(token string, tokenType string) (*Payload, error)
}
func NewJWTMaker ¶
Click to show internal directories.
Click to hide internal directories.