Sha256: 9b3ed09345f8693249a43db9b9c0a4e9e0fbe65c82e60e6547d0415301820ff5

Contents?: true

Size: 1.02 KB

Versions: 9

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require 'active_support'
require 'active_support/concern'
require 'active_support/configurable'
require 'active_support/cache'
require 'active_support/core_ext/hash'
require 'active_support/time'
require 'active_support/time_with_zone'
require 'jwt'
require 'keyless/version'
require 'keyless/configuration'
require 'keyless/jwt'
require 'keyless/rsa_public_key'

# The JWT authentication concern.
module Keyless
  extend ActiveSupport::Concern

  class << self
    attr_writer :configuration
  end

  # Retrieve the current configuration object.
  #
  # @return [Configuration]
  def self.configuration
    @configuration ||= Configuration.new
  end

  # Configure the concern by providing a block which takes
  # care of this task. Example:
  #
  #   Keyless.configure do |conf|
  #     # conf.xyz = [..]
  #   end
  def self.configure
    yield(configuration)
  end

  # Reset the current configuration with the default one.
  def self.reset_configuration!
    self.configuration = Configuration.new
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
keyless-1.4.0 lib/keyless.rb
keyless-1.3.5 lib/keyless.rb
keyless-1.3.4 lib/keyless.rb
keyless-1.3.3 lib/keyless.rb
keyless-1.3.2 lib/keyless.rb
keyless-1.3.1 lib/keyless.rb
keyless-1.3.0 lib/keyless.rb
keyless-1.2.0 lib/keyless.rb
keyless-1.1.0 lib/keyless.rb