File: configuration.rb

package info (click to toggle)
ruby-jwt 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 876 kB
  • sloc: ruby: 5,550; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 660 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require_relative 'configuration/container'

module JWT
  # The Configuration module provides methods to configure JWT settings.
  module Configuration
    # Configures the JWT settings.
    #
    # @yield [config] Gives the current configuration to the block.
    # @yieldparam config [JWT::Configuration::Container] the configuration container.
    def configure
      yield(configuration)
    end

    # Returns the JWT configuration container.
    #
    # @return [JWT::Configuration::Container] the configuration container.
    def configuration
      @configuration ||= ::JWT::Configuration::Container.new
    end
  end
end