-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
use JWT middleware and validators separately
Example:
- validator
type Validator interface {
Validate(string, interface{}) error // interface is Claims object
}- middleware
func JWT(validator Validator, cf func() Claims) Middleware {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {Metadata
Metadata
Assignees
Labels
No labels