All Projects → doorkeeper-gem → Doorkeeper Jwt

doorkeeper-gem / Doorkeeper Jwt

Licence: mit
JWT Token support for Doorkeeper

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Doorkeeper Jwt

Jwt Spring Security Jpa
Backend MVP showcasing JWT (Json Web Token) authentication with multiple login, timeout / refresh / logout (with in memory invalidation) using Spring Security & MySQL JPA.
Stars: ✭ 202 (+16.09%)
Mutual labels:  jwt, jwt-token, jwt-auth
Jwt
Go JWT signing, verifying and validating
Stars: ✭ 394 (+126.44%)
Mutual labels:  jwt, jwt-token, jwt-auth
Jwtpermission
基于token验证的Java Web权限控制框架,使用jjwt,支持redis和db多种存储方式,可用于前后端分离项目,功能完善、使用简单、易于扩展。
Stars: ✭ 186 (+6.9%)
Mutual labels:  jwt, jwt-token, jwt-auth
Reallysimplejwt
A really simple library to generate JSON Web Tokens in PHP.
Stars: ✭ 218 (+25.29%)
Mutual labels:  jwt, jwt-token, jwt-auth
React Login
A client side implementation of authentication using react.js for my blog on medium. This is the second part of my previous blog on how to implement scalable node.js server.
Stars: ✭ 105 (-39.66%)
Mutual labels:  jwt, jwt-token, jwt-auth
Jose2go
Golang (GO) implementation of Javascript Object Signing and Encryption specification
Stars: ✭ 150 (-13.79%)
Mutual labels:  jwt, jwt-token, jwt-auth
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (-89.66%)
Mutual labels:  jwt, jwt-token
Php Storageless Sessions
Sessions handler which stores session data in HMAC-signed and encrypted cookies
Stars: ✭ 29 (-83.33%)
Mutual labels:  jwt, jwt-token
Laravel Jwt
Laravel with JWT Authentication for API development
Stars: ✭ 31 (-82.18%)
Mutual labels:  jwt-token, jwt-auth
Laravel Vue Starter
Well Documented Laravel Starter App From Development to Production. For Full Blown RESTFUL API and SPA with Beautiful UI Using Buefy / ElementUi For Reusable Vue Components
Stars: ✭ 76 (-56.32%)
Mutual labels:  jwt, jwt-token
Duckygo
一个同时支持Session以及JWT的高性能高可用 Golang Restful API 脚手架 !
Stars: ✭ 57 (-67.24%)
Mutual labels:  jwt, jwt-token
Ngx Api Utils
ngx-api-utils is a lean library of utilities and helpers to quickly integrate any HTTP API (REST, Ajax, and any other) with Angular.
Stars: ✭ 92 (-47.13%)
Mutual labels:  jwt, jwt-token
Jose Jwt
Ultimate Javascript Object Signing and Encryption (JOSE) and JSON Web Token (JWT) Implementation for .NET and .NET Core
Stars: ✭ 692 (+297.7%)
Mutual labels:  jwt, jwt-token
F License
Open Source License Key Generation and Verification Tool written in Go
Stars: ✭ 535 (+207.47%)
Mutual labels:  jwt, jwt-token
Jwt
Kotlin JWT 🔑 implementation (Json Web Token) as required by APNs 🔔 (Apple Push Notifications) or Sign in with Apple 🍏
Stars: ✭ 31 (-82.18%)
Mutual labels:  jwt, jwt-token
Springboot Jwt Demo
这是一个使用了springboot+springSecurity+jwt实现的基于token的权限管理的一个demo
Stars: ✭ 505 (+190.23%)
Mutual labels:  jwt-token, jwt-auth
Springboot React Jwt
JSON Web Token / React / Spring Boot example
Stars: ✭ 72 (-58.62%)
Mutual labels:  jwt, jwt-token
Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (-35.06%)
Mutual labels:  jwt-token, jwt-auth
Netcoreblockly
.NET Core API to Blockly - generate from WebAPI, Swagger, OData, GraphQL =>
Stars: ✭ 121 (-30.46%)
Mutual labels:  jwt, jwt-auth
Jwt Cli
A super fast CLI tool to decode and encode JWTs built in Rust
Stars: ✭ 336 (+93.1%)
Mutual labels:  jwt, jwt-token

Gem Version Coverage Status Build Status Maintainability

Doorkeeper::JWT

Doorkeeper JWT adds JWT token support to the Doorkeeper OAuth library. Confirmed to work with Doorkeeper 2.2.x - 4.x. Untested with later versions of Doorkeeper.

gem 'doorkeeper'

Installation

Add this line to your application's Gemfile:

gem 'doorkeeper-jwt'

And then execute:

$ bundle

Or install it yourself as:

$ gem install doorkeeper-jwt

Usage

In your doorkeeper.rb initializer add the follow to the Doorkeeper.configure block:

access_token_generator '::Doorkeeper::JWT'

Then add a Doorkeeper::JWT.configure block below the Doorkeeper.configure block to set your JWT preferences.

Doorkeeper::JWT.configure do
  # Set the payload for the JWT token. This should contain unique information
  # about the user. Defaults to a randomly generated token in a hash:
  #     { token: "RANDOM-TOKEN" }
  token_payload do |opts|
    user = User.find(opts[:resource_owner_id])

    {
      iss: 'My App',
      iat: Time.current.utc.to_i,

      # @see JWT reserved claims - https://tools.ietf.org/html/draft-jones-json-web-token-07#page-7
      jti: SecureRandom.uuid,

      user: {
        id: user.id,
        email: user.email
      }
    }
  end

  # Optionally set additional headers for the JWT. See
  # https://tools.ietf.org/html/rfc7515#section-4.1
  token_headers do |opts|
    { kid: opts[:application][:uid] }
  end

  # Use the application secret specified in the access grant token. Defaults to
  # `false`. If you specify `use_application_secret true`, both `secret_key` and
  # `secret_key_path` will be ignored.
  use_application_secret false

  # Set the encryption secret. This would be shared with any other applications
  # that should be able to read the payload of the token. Defaults to "secret".
  secret_key ENV['JWT_SECRET']

  # If you want to use RS* encoding specify the path to the RSA key to use for
  # signing. If you specify a `secret_key_path` it will be used instead of
  # `secret_key`.
  secret_key_path File.join('path', 'to', 'file.pem')

  # Specify encryption type (https://github.com/progrium/ruby-jwt). Defaults to
  # `nil`.
  encryption_method :hs512
end

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

  1. Fork it (https://github.com/[my-github-username]/doorkeeper-jwt/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].