Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = errors.New("token invalid") ErrExpiredToken = errors.New("token expired") )
Functions ¶
This section is empty.
Types ¶
type Maker ¶
type Maker interface { MakeToken(email string, duration time.Duration) (string, error) VerifyToken(token string) (*Payload, error) }
func PasetoMaker ¶
type PasetoTokenMaker ¶
type PasetoTokenMaker struct {
// contains filtered or unexported fields
}
func NewPasetoTokenMaker ¶
func NewPasetoTokenMaker() *PasetoTokenMaker
func (*PasetoTokenMaker) VerifyToken ¶
func (maker *PasetoTokenMaker) VerifyToken(token string) (*Payload, error)
Click to show internal directories.
Click to hide internal directories.