Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTCustomClaims ¶
type JWTCustomClaims struct { UID string `json:"uid"` jwt.StandardClaims }
func (*JWTCustomClaims) MarshalLogObject ¶
func (c *JWTCustomClaims) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*JWTCustomClaims) Valid ¶
func (c *JWTCustomClaims) Valid() error
type JWTService ¶
type JWTService interface { CreateToken(id string) (jwt, uid string, err error) ParseToken(jwt string) (*JWTCustomClaims, error) TokenTTL() time.Duration }
func NewJWTService ¶
func NewJWTService(cfg Config) (JWTService, error)
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures a TokensService.
func SetPrivateKey ¶
func SetPublicKey ¶
Click to show internal directories.
Click to hide internal directories.