https://github.com/jpalumickas/auth0-verifier
Auth0 Token Verifier
https://github.com/jpalumickas/auth0-verifier
auth0 auth0-jwt jwks jwt ruby ruby-on-rails
Last synced: about 2 months ago
JSON representation
Auth0 Token Verifier
- Host: GitHub
- URL: https://github.com/jpalumickas/auth0-verifier
- Owner: jpalumickas
- License: mit
- Created: 2019-01-10T21:48:21.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2022-11-03T12:23:42.000Z (over 2 years ago)
- Last Synced: 2024-04-23T22:37:24.443Z (12 months ago)
- Topics: auth0, auth0-jwt, jwks, jwt, ruby, ruby-on-rails
- Language: Ruby
- Size: 40 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Auth0 Verifier
Verify [Auth0][auth0] JWT token using RS256 with JWKS method.
[][rubygems]
[][codecov]## Installation
Add this line to your application's Gemfile:
```ruby
gem 'auth0-verifier'
```## Usage
### In Rails using initializer
Create file `config/initializers/auth0.rb` and add:
```rb
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:
```rb
Auth0::Verifier.verify('my token')```
## Supported Ruby Versions
This library aims to support and is [tested against][github_actions] the following Ruby
implementations:* Ruby 2.7
* Ruby 3.0
* Ruby 3.1
* Ruby 3.2
* Ruby 3.3
* Ruby 3.4## 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](http://contributor-covenant.org) 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](https://github.com/jpalumickas/auth0-verifier/blob/master/CODE_OF_CONDUCT.md).
## Copyright
The gem is available as open source under the terms of the [MIT License][license].
[rubygems]: https://rubygems.org/gems/auth0-verifier
[codecov]: https://codecov.io/gh/jpalumickas/auth0-verifier
[github_actions]: https://github.com/jpalumickas/auth0-verifier/actions[license]: https://raw.githubusercontent.com/jpalumickas/auth0-verifie/master/LICENSE
[auth0]: https://auth0.com