Documentation
¶
Index ¶
- func FromAuthHeader(r *http.Request) (string, error)
- func FromContext(ctx context.Context) (jwt.Claims, bool)
- func GetJWTTokenStr(r *http.Request) string
- func OnError(w http.ResponseWriter, r *http.Request, err string)
- func WithClaims(ctx context.Context, claims jwt.Claims) context.Context
- type Middleware
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJWTTokenStr ¶
Types ¶
type Middleware ¶
type Middleware struct {
Options Options
}
func New ¶
func New(opts Options) *Middleware
func (*Middleware) CheckJWT ¶
func (m *Middleware) CheckJWT(w http.ResponseWriter, r *http.Request) (*http.Request, error)
func (*Middleware) CheckJWTTCP ¶
func (m *Middleware) CheckJWTTCP(token string) (jwt.Claims, error)
Click to show internal directories.
Click to hide internal directories.