Documentation
¶
Index ¶
- type Claims
- type JWT
- func (j *JWT) FromContext(ctx context.Context) *Claims
- func (j *JWT) GenerateToken(id int64, name string) string
- func (j *JWT) JWTAuth() middleware.Middleware
- func (j *JWT) ParseToken(token string) (*Claims, error)
- func (j *JWT) Secret() jwt.Keyfunc
- func (j *JWT) WithContext(ctx context.Context, session *Claims) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct {
ID int64 `json:"ID"`
Name string `json:"Name"`
jwt.RegisteredClaims
}
type JWT ¶
type JWT struct {
// contains filtered or unexported fields
}
func (*JWT) JWTAuth ¶
func (j *JWT) JWTAuth() middleware.Middleware
Click to show internal directories.
Click to hide internal directories.