JWT Rewrite is a middleware plugin for Traefik which verifies a jwt token and rewrites a new jwt for further authentication
Inspired and modified from https://github.com/23deg/jwt-middleware
Start with command
command:
- "--experimental.plugins.jwt-rewrite.modulename=github.com/irotem/jwt-rewrite"
- "--experimental.plugins.jwt-rewrite.version=v0.1"
Activate plugin in your config
http:
middlewares:
my-jwt-rewrite:
plugin:
jwt-rewrite:
hash: HS256
verify:
secret: SECRET
authHeader: Authorization
headerPrefix: Bearer
sign:
secret: SECRET
authHeader: Authorization
headerPrefix: Bearer
Use as docker-compose label
labels:
- "traefik.http.routers.my-service.middlewares=my-jwt-rewrite@prodvider"