Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { // Id is the agent id Id string `json:"id"` jwt.RegisteredClaims }
func DefaultClaims ¶
func DefaultClaims(opts ...OptionsFunc) *Claims
type JWTHandler ¶
type JWTHandler struct {
// contains filtered or unexported fields
}
func New ¶
func New(key string) *JWTHandler
func (*JWTHandler) GenerateJWT ¶
func (j *JWTHandler) GenerateJWT(claims *Claims) (tokenString string, err error)
func (*JWTHandler) ValidateToken ¶
func (j *JWTHandler) ValidateToken(signedToken string) (*Claims, error)
type OptionsFunc ¶
type OptionsFunc func(*Claims)
func OptionId ¶
func OptionId(id string) OptionsFunc
Click to show internal directories.
Click to hide internal directories.