{"repo":"rubyroidlabs/rails_api_keys","free":true,"listed":false,"github":"https://github.com/rubyroidlabs/rails_api_keys","clone":"git clone https://github.com/rubyroidlabs/rails_api_keys.git","description":"Issue, hash, revoke, and authenticate personal API keys in Rails","language":"Ruby","stars":10,"topics":["api","api-key","api-key-auth","api-key-management","api-key-manager","api-keys","auth","authentication","rails","rails-api"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"rails api keys Reusable Rails engine for personal API keys: create (reveal once), hash at rest, revoke, and authenticate via Authorization: Bearer . Host apps own UI, routes, and domain APIs. This gem stays thin on purpose. What this gem includes - RailsApiKeys::ApiKey — issue, authenticate, revoke - has api keys — opt-in owner macro with create api key! (supports multiple models) - RailsApiKeys::Authentication — controller concern for Bearer tokens - Install generator (migration + initializer) No mailers, jobs, views, assets, or mounted domain routes. Installation Add the gem and install: Host setup Opt in on each owner model with has api keys (any number of models): That declares has many :api keys and allows the model to own keys. Build your own controllers/UI to create keys (show the raw token once), list them, and revoke — or use the optional companion gem below. Optional UI For a ready-made HTML/JSON management UI (create, reveal once + copy, list active keys, revoke), install the companion gem rails api keys-ui : See that repo for install generators, route helpers, embeddable panel, and configuration. Configuration Defaults suit a typical Devise User host; multiple owners are supported via has api keys : Option Default Purpose --- --- --- token prefix \"#{AppName.downcase} ak \" Prefix on generated raw tokens owner active active for authentication? when present Reject keys whose owner is inactive Override only what you need: Usage Clients send: authenticate api key! reje","default_branch":null,"files":null,"tree":[],"storefront":"/r/rubyroidlabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rubyroidlabs/rails_api_keys/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}