Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 759 Bytes

README.md

File metadata and controls

33 lines (27 loc) · 759 Bytes

JWT Token

JWT Token is a middleware plugin for Traefik which verifies a jwt token and adds the payload as injected header to the request

Configuration

Start with command

command:
  - "--experimental.plugins.jwt-token.modulename=github.com/toanz/jwt-token"
  - "--experimental.plugins.jwt-token.version=v0.1.2"

Activate plugin in your config

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
meta:
spec:
  plugin:
    jwt-token:
      secret: SECRET
      proxyHeaderName: injectedPayload
      authHeader: Authorization
      headerPrefix: Bearer

Use as docker-compose label

  labels:
        - "traefik.http.routers.my-service.middlewares=my-jwt-token@file"