Files
contracts/jwt_auth.go
T
2026-05-15 09:04:12 +08:00

15 lines
314 B
Go

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