lib/jwt_authenticable.rb in researchable_jwt-authenticable-1.0.0 vs lib/jwt_authenticable.rb in researchable_jwt-authenticable-1.0.1
- old
+ new
@@ -1,14 +1,18 @@
# frozen_string_literal: true
require 'dry-configurable'
+require 'jwt'
# The module 'JwtAuth' provides jwt authentication for rails using the jwt gem
# @author Researchable
module JwtAuthenticable
extend Dry::Configurable
setting :algorithm
+ # Note that for RSA algorithms this will actually be the public key
setting :jwt_secret_key, default: nil
+
+ SUPPORTED_ALGOS = [JWT::Algos::Hmac, JWT::Algos::Rsa].freeze
class Error < StandardError; end
end
require_relative 'jwt_authenticable/version'