{"repo":"hausgold/grape-jwt-authentication","free":true,"listed":false,"github":"https://github.com/hausgold/grape-jwt-authentication","clone":"git clone https://github.com/hausgold/grape-jwt-authentication.git","description":"A reusable Grape JWT authentication concern","language":"Ruby","stars":33,"topics":["grape","grape-api","concern","jwt","authentification","middleware","rack","oss","gem","ruby-gem"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"This gem is dedicated to easily integrate a JWT authentication to your Grape API. The real authentication functionality must be provided by the user and this makes this gem highly flexible on the JWT verification level. - Installation - Usage - Grape API - Helpers - Configuration - Authenticator - Malformed token handling - Failed authentication handling - RSA public key helper - RSA public key location (URL) - RSA public key caching - RSA public key cache expiration - JWT instance helper - Issuer verification - Beholder (audience) verification - Custom JWT verification options - Custom JWT verification key - Per-API configuration - Full RSA256 example - Development - Code of Conduct - Contributing - Releasing Installation Add this line to your application's Gemfile: And then execute: Or install it yourself as: Usage Grape API You can enable the JWT authentication on any Grape API you like. This includes specific endpoints or a whole API. Just include the Grape::Jwt::Authentication module and configure it the way you like. Helpers The inclusion of the Grape::Jwt::Authentication inserts some helpers to access the parsed and original JWT. This can be handy when you need to work with the JWT payload or perform some extra calculations with the expiration date of it. The following example demonstrated the usage of the helpers. Configuration This gem is quite customizable and flexible to fulfill your needs. You can make use of some parts and leave other if you do not care about the","default_branch":null,"files":null,"tree":[],"storefront":"/r/hausgold","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hausgold/grape-jwt-authentication/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."}