contracts/jwt_auth.go

15 lines
311 B
Go

package contracts
import (
"net/http"
"github.com/lestrrat-go/jwx/jwt"
"github.com/samber/do"
)
type JWTAuth interface {
Authenticator(container *do.Injector) func(next http.Handler) http.Handler
Encode(claims map[string]interface{}) (token string, err error)
Decode(token string) (jwt.Token, error)
}