Versions in this module Expand all Collapse all v2 v2.1.1 Aug 28, 2025 Changes in this version + type JWTMiddleware struct + Authenticator func(ctx context.Context, userId string, password string) (string, bool) + Authorizator func(ctx context.Context, userId string, request *rest.Request) bool + Debug bool + Key []byte + MaxRefresh time.Duration + PayloadFunc func(ctx context.Context, userId string) map[string]interface{} + Realm string + SigningAlgorithm string + Timeout time.Duration + func (mw *JWTMiddleware) LoginHandler(writer rest.ResponseWriter, request *rest.Request) + func (mw *JWTMiddleware) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc + func (mw *JWTMiddleware) RefreshHandler(writer rest.ResponseWriter, request *rest.Request) + type RestClaims struct + Custom map[string]interface{} + OriginalIssuedAt int64 + RefreshUntil int64 + func ExtractClaims(request *rest.Request) *RestClaims + func (rc RestClaims) Valid() error