{"id":16994641,"url":"https://github.com/znerol/txnginxjwt","last_synced_at":"2026-05-19T03:42:35.926Z","repository":{"id":136256271,"uuid":"248739101","full_name":"znerol/txnginxjwt","owner":"znerol","description":"Nginx auth_request backend for JWT passed in via HTTP user field","archived":false,"fork":false,"pushed_at":"2020-03-23T18:53:38.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T06:28:03.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/znerol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-20T11:29:31.000Z","updated_at":"2020-03-23T18:53:40.000Z","dependencies_parsed_at":"2023-06-13T22:15:31.827Z","dependency_job_id":null,"html_url":"https://github.com/znerol/txnginxjwt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Ftxnginxjwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Ftxnginxjwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Ftxnginxjwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Ftxnginxjwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znerol","download_url":"https://codeload.github.com/znerol/txnginxjwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913005,"owners_count":20530769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-14T03:46:08.533Z","updated_at":"2026-05-19T03:42:30.907Z","avatar_url":"https://github.com/znerol.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"JWT authentication for NGINX\n============================\n\nA Twisted application plugin capable of validating JWT tokens passed in via a\nHTTP query parameter (`token` by default).\n\nIf token validation succeeds a session cookie is set in the browser and\nsubsequent requests with that cookie are accepted as well. Session cookie\nparameters can be passed in an optional `session` claim, an object with the\nfollowing keys (all optional):\n\n    \"session\" = {\n        \"expires\": \"Wed, 21 Oct 2015 07:28:00 GMT\",\n        \"maxAge\": 2592000,\n        \"domain\": \"foo.example.com\",\n        \"path\": \"/site\",\n        \"secure\": 1,\n        \"httpOnly\": 1,\n        \"sameSite\": \"strict\"\n    }\n\nThe `exp` and `nbf` claims are checked if they are set on the token but not\nenforced if not set.\n\nUsage\n-----\n\n```\nUsage: twistd [options] nginxjwt [options]\nOptions:\n  -c, --cookie=   Session cookie name. [default: txngjwt]\n  -h, --header=   Header where nginx supplies the original url. [default:\n                  X-Original-URI]\n      --help      Display this help and exit.\n  -k, --keyfile=  The JWT public key in PEM format. [default: jwt.pub.pem]\n  -p, --port=     The port number to listen on. [default: 8081]\n  -q, --param=    JWT token query parameter. [default: token]\n  -t, --ttl=      Session cookie ttl in seconds. [default: 43200]\n      --version   Display Twisted version and exit.\n```\n\n\nNginx Configuration\n-------------------\n\n    location @jwt-auth {\n        internal;\n\n        proxy_pass http://twisted-nginx-jwt-upstream;\n        proxy_pass_request_body off;\n        proxy_set_header Content-Length \"\";\n        proxy_set_header X-Original-URI $request_uri;\n\n        include /etc/nginx/proxy_params;\n    }\n\n    location /protected-resource {\n        auth_request @jwt-auth;\n        auth_request_set $saved_set_cookie $upstream_http_set_cookie;\n        add_header Set-Cookie $saved_set_cookie;\n    }\n\nMore details in [Nginx Docs](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/).\n\n\nSimilar Projects\n----------------\n\n* [pusher/oauth2_proxy](https://pusher.github.io/oauth2_proxy/)\n  A reverse proxy that provides authentication with Google, Github or other\n  providers.\n* [vouch/vouch-proxy](https://github.com/vouch/vouch-proxy/)\n  An SSO solution for Nginx using the `auth_request` module.\n* [auth0/nginx-jwt](https://github.com/auth0/nginx-jwt)\n  (Archived) Lua script for Nginx that performs reverse proxy auth using JWT's\n* [Nginx Plus](https://www.nginx.com/blog/authenticating-api-clients-jwt-nginx-plus/)\n  (Proprietary)\n\n\nLicense\n-------\n\n[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznerol%2Ftxnginxjwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznerol%2Ftxnginxjwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznerol%2Ftxnginxjwt/lists"}