{"id":22748706,"url":"https://github.com/fgrehm/rack-jwt","last_synced_at":"2025-08-08T19:31:23.112Z","repository":{"id":33504753,"uuid":"37150713","full_name":"fgrehm/rack-jwt","owner":"fgrehm","description":"Rack middleware that provides authentication based on JSON Web Tokens","archived":false,"fork":false,"pushed_at":"2015-06-09T18:59:02.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-04-10T09:40:03.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"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/fgrehm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-09T18:34:32.000Z","updated_at":"2023-04-10T09:40:03.097Z","dependencies_parsed_at":"2022-08-07T22:00:23.895Z","dependency_job_id":null,"html_url":"https://github.com/fgrehm/rack-jwt","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Frack-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Frack-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Frack-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Frack-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgrehm","download_url":"https://codeload.github.com/fgrehm/rack-jwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229169589,"owners_count":18030688,"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-12-11T03:34:23.897Z","updated_at":"2024-12-11T03:34:24.361Z","avatar_url":"https://github.com/fgrehm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rack::JWT\n\n[![Gem Version](https://badge.fury.io/rb/rack-jwt.svg)](http://badge.fury.io/rb/rack-jwt)\n[![Build Status](https://travis-ci.org/eigenbart/rack-jwt.svg)](https://travis-ci.org/eigenbart/rack-jwt)\n[![Code Climate](https://codeclimate.com/github/eigenbart/rack-jwt/badges/gpa.svg)](https://codeclimate.com/github/eigenbart/rack-jwt)\n\nThis gem provides JSON Web Token (JWT) based authentication.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rack-jwt'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rack-jwt\n\n## Usage\n\n### sinatra\n\n```\nuse Rack::JWT::Auth secret: 'you_secret_token_goes_here', exclude: ['/api/docs']\n```\n\n### Rails\n\n```\nRails.application.config.middleware.use, Rack::JWT::Auth, secret: Rails.application.secrets.secret_key_base, exclude: ['/api/docs']\n```\n\n## Generating tokens\nYou can generate JSON Wen Tokens for your users using the `Token#encode` method\n\n```\nRack::JWT::Token.encode(payload, secret)\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/rack-jwt/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrehm%2Frack-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgrehm%2Frack-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrehm%2Frack-jwt/lists"}