Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpiredToken = errors.New("token has expired") ErrInvalidToken = errors.New("token is invalid") )
Functions ¶
This section is empty.
Types ¶
type JWTMarker ¶
type JWTMarker struct {
// contains filtered or unexported fields
}
func (*JWTMarker) CreateToken ¶
type Maker ¶
type Maker interface { // CreateToken creates a new token for a specific username and password CreateToken(username string, duration time.Duration) (string, error) // VerifyToken checks if the token is valid or not VerifyToken(token string) (*Payload, error) }
func NewJWTMaker ¶
func NewPasetoMaker ¶
type PasetoMaker ¶
type PasetoMaker struct {
// contains filtered or unexported fields
}
func (*PasetoMaker) CreateToken ¶
CreateToken creates a new token for a specific username and password
func (*PasetoMaker) VerifyToken ¶
func (m *PasetoMaker) VerifyToken(token string) (*Payload, error)
VerifyToken checks if the token is valid or not
Click to show internal directories.
Click to hide internal directories.