assusdan / jwt-middleware

JWT verification for traefik v2.3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JWT Middleware

JWT Middleware 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-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: SECRET
          proxyHeaderName: injectedPayload
          authHeader: Authorization
          headerPrefix: Bearer

Use as docker-compose label

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

About

JWT verification for traefik v2.3

License:MIT License


Languages

Language:Go 100.0%