Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpiredToken = errors.New("token as expired") ErrInvalidToken = errors.New("Invalid Token Error") )
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(username string, duration time.Duration) (string, error) VerifyToken(token string) (*Payload, error) }
maker will be used to manage our tokens
func NewJWTMaker ¶
func NewPasetoMarker ¶
type PasetoMarker ¶
type PasetoMarker struct {
// contains filtered or unexported fields
}
func (*PasetoMarker) CreateToken ¶
func (*PasetoMarker) VerifyToken ¶
func (maker *PasetoMarker) VerifyToken(token string) (*Payload, error)
Click to show internal directories.
Click to hide internal directories.