Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPasswordInvalid = errors.New("password invalid")
View Source
var ErrTokenExpired = errors.New("token expired")
View Source
var ErrTokenInvalid = errors.New("token invalid")
Functions ¶
This section is empty.
Types ¶
type PasetoPayload ¶
type PasetoPayload struct { Audience string `json:"aud"` Issuer string `json:"issuer"` Subject string `json:"sub"` IssuedAt time.Time `json:"iat"` Expiration time.Time `json:"exp"` NotBefore time.Time `json:"nbf"` Jti uuid.UUID `json:"jti"` }
func CreatePasetoPayload ¶
func CreatePasetoPayload( email string, duration time.Duration) *PasetoPayload
func (*PasetoPayload) CreatePasetoTokenByPayload ¶
func (p *PasetoPayload) CreatePasetoTokenByPayload(key []byte) (string, error)
Click to show internal directories.
Click to hide internal directories.