Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { Id int64 `json:"id"` jwt.RegisteredClaims }
func BuildCustomClaims ¶
func BuildCustomClaims(id int64, duration, issuer, subject string) (*CustomClaims, error)
type JWT ¶
type JWT struct {
SigningKey []byte
}
func (*JWT) CreateToken ¶
func (j *JWT) CreateToken(claims *CustomClaims) (string, error)
func (*JWT) ParseToken ¶
func (j *JWT) ParseToken(tokenString string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.