{"id":37175828,"url":"https://github.com/sorasful/traefik-jwt-optional-api-validator","last_synced_at":"2026-01-14T20:31:30.333Z","repository":{"id":65349858,"uuid":"590549795","full_name":"sorasful/traefik-jwt-optional-api-validator","owner":"sorasful","description":"Traefik Middleware to check incoming request's Authorization token to see if that's valid or not using an API call. Avoiding duplicating verification code.","archived":false,"fork":false,"pushed_at":"2023-01-28T22:11:17.000Z","size":25,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T14:49:49.360Z","etag":null,"topics":["jwt","traefik","traefik-plugin","traefik-plugin-catalog"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sorasful.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-18T17:08:54.000Z","updated_at":"2023-01-28T16:39:47.000Z","dependencies_parsed_at":"2023-02-15T19:15:48.469Z","dependency_job_id":null,"html_url":"https://github.com/sorasful/traefik-jwt-optional-api-validator","commit_stats":null,"previous_names":["sorasful/traefik-jwt-optional-nofork"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/sorasful/traefik-jwt-optional-api-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorasful%2Ftraefik-jwt-optional-api-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorasful%2Ftraefik-jwt-optional-api-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorasful%2Ftraefik-jwt-optional-api-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorasful%2Ftraefik-jwt-optional-api-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sorasful","download_url":"https://codeload.github.com/sorasful/traefik-jwt-optional-api-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorasful%2Ftraefik-jwt-optional-api-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jwt","traefik","traefik-plugin","traefik-plugin-catalog"],"created_at":"2026-01-14T20:31:29.724Z","updated_at":"2026-01-14T20:31:30.315Z","avatar_url":"https://github.com/sorasful.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT Middleware API Validator\n\nJWT Middleware API Validator is a middleware plugin for [Traefik](https://github.com/containous/traefik) which verifies a jwt token and adds the payload as injected header to the request\n\n\nMeaning that if the authorization code is in the request, it will get checked, and if it does, the request will go through.\nThe way the request is checked is by sending a GET request to a specific endpoint that you can override with `ValidateAPIUrl`. \nIf it returns a 200 response, it will go through.\n\nIf you want to check that a request is authenticated you'll need to verify that there is a `Authorization` header in your request.\nYou can also check the header that is injected `ProxyHeaderName`  which is `injectedPayload` by default.\n\nWe delete it from the incoming requests, just in case.\n\nThis plugin is heavily inspired by : https://github.com/23deg/jwt-middleware \n\n\n\n## Configuration\n\nStart with command\n```yaml\ncommand:\n  - \"--experimental.plugins.traefik-jwt-optional-api-validator.modulename=github.com/sorasful/traefik-jwt-optional-api-validator\"\n  - \"--experimental.plugins.traefik-jwt-optional-api-validator.version=v0.0.14\"\n```\n\nActivate plugin in your config  \n\n```yaml\nhttp:\n  middlewares:\n    my-jwt-middleware:\n      plugin:\n        traefik-jwt-optional-api-validator:\n          proxyHeaderName: injectedPayload\n          authHeader: Authorization\n          headerPrefix: Bearer\n          optional: true\n          ValidateAPIUrl: http://yourAPI/validate-token\n```\n\nUse as docker-compose label  \n```yaml\n  labels:\n        - \"traefik.http.routers.my-service.middlewares=my-jwt-middleware@file\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorasful%2Ftraefik-jwt-optional-api-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsorasful%2Ftraefik-jwt-optional-api-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorasful%2Ftraefik-jwt-optional-api-validator/lists"}