15 lines
312 B
Go
15 lines
312 B
Go
package contracts
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/lestrrat-go/jwx/jwt"
|
|
"github.com/samber/do"
|
|
)
|
|
|
|
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)
|
|
}
|