Class: JWT::Configuration::Container

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt/configuration/container.rb

Overview

The Container class holds the configuration settings for JWT.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContainer

Initializes a new Container instance and resets the configuration.



23
24
25
# File 'lib/jwt/configuration/container.rb', line 23

def initialize
  reset!
end

Instance Attribute Details

#decodeDecodeConfiguration

Returns the decode configuration.

Returns:



16
17
18
# File 'lib/jwt/configuration/container.rb', line 16

def decode
  @decode
end

#deprecation_warningsObject

Returns the value of attribute deprecation_warnings.



20
21
22
# File 'lib/jwt/configuration/container.rb', line 20

def deprecation_warnings
  @deprecation_warnings
end

#jwkJwkConfiguration

Returns the JWK configuration.

Returns:



16
# File 'lib/jwt/configuration/container.rb', line 16

attr_accessor :decode, :jwk, :strict_base64_decoding

#strict_base64_decodingBoolean

Returns whether strict Base64 decoding is enabled.

Returns:

  • (Boolean)

    whether strict Base64 decoding is enabled.



16
# File 'lib/jwt/configuration/container.rb', line 16

attr_accessor :decode, :jwk, :strict_base64_decoding

Instance Method Details

#reset!void

This method returns an undefined value.

Resets the configuration to default values.



30
31
32
33
34
35
36
# File 'lib/jwt/configuration/container.rb', line 30

def reset!
  @decode                 = DecodeConfiguration.new
  @jwk                    = JwkConfiguration.new
  @strict_base64_decoding = false

  self.deprecation_warnings = :once
end