0.0
Low commit activity in last 3 years
No release in over a year
Auth0 verifier for Auth0 JWT tokens for RS256
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2
~> 13.0
~> 0.6
~> 0.14
~> 3.12
~> 1.38
~> 0.21
~> 3.18

Runtime

>= 2.0
 Project Readme

Auth0 Verifier

Verify Auth0 JWT token using RS256 with JWKS method.

Gem Version Coverage Status

Installation

Add this line to your application's Gemfile:

gem 'auth0-verifier'

Usage

In Rails using initializer

Create file config/initializers/auth0.rb and add:

Auth0::Verifier.configure do |config|
  config.domain = 'test.auth0.com' # Defaults to ENV variable AUTH0_DOMAIN
  config.audience = 'https://example.com' # Defaults to ENV variable AUTH0_AUDIENCE

  # Optional:
  #
  # config.type = :RS256 # Default RS256 using JWKS
  # config.jwks_url = 'https://test.auth0.com/.well-known/jwks.json' # Defaults to domain
end

Verify token:

Auth0::Verifier.verify('my token')

Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:

  • Ruby 2.6
  • Ruby 2.7
  • Ruby 3.0
  • Ruby 3.1

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jpalumickas/auth0-verifier. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Code of Conduct

Everyone interacting in the Auth0 Verifier project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Copyright

Copyright (c) 2022 Justas Palumickas. See LICENSE for details.