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