JWT Middleware is a middleware plugin for Traefik which verifies a jwt token and adds the payload as injected header to the request
Start with command
command:- "--experimental.plugins.jwt-middleware.modulename=github.com/23deg/jwt-middleware"- "--experimental.plugins.jwt-middleware.version=v0.1.2"
Activate plugin in your config
http:middlewares:my-jwt-middleware:plugin:jwt-middleware:secret: SECRETproxyHeaderName: injectedPayloadauthHeader: AuthorizationheaderPrefix: Bearer
Use as docker-compose label
labels:- "traefik.http.routers.my-service.middlewares=my-jwt-middleware@file"