class JWT::Configuration::Container
The Container
class holds the configuration settings for JWT
.
Constants
- DEPRECATION_WARNINGS_VALUES
Attributes
decode[RW]
@!attribute [rw] decode
@return [DecodeConfiguration] the decode configuration.
@!attribute [rw] jwk
@return [JwkConfiguration] the JWK configuration.
@!attribute [rw] strict_base64_decoding
@return [Boolean] whether strict Base64 decoding is enabled.
deprecation_warnings[R]
@!attribute [r] deprecation_warnings
@return [Symbol] the deprecation warnings setting.
jwk[RW]
@!attribute [rw] decode
@return [DecodeConfiguration] the decode configuration.
@!attribute [rw] jwk
@return [JwkConfiguration] the JWK configuration.
@!attribute [rw] strict_base64_decoding
@return [Boolean] whether strict Base64 decoding is enabled.
strict_base64_decoding[RW]
@!attribute [rw] decode
@return [DecodeConfiguration] the decode configuration.
@!attribute [rw] jwk
@return [JwkConfiguration] the JWK configuration.
@!attribute [rw] strict_base64_decoding
@return [Boolean] whether strict Base64 decoding is enabled.
Public Class Methods
new()
click to toggle source
Initializes a new Container
instance and resets the configuration.
# File lib/jwt/configuration/container.rb, line 23 def initialize reset! end
Public Instance Methods
deprecation_warnings=(value)
click to toggle source
Sets the deprecation warnings setting.
@param value [Symbol] the deprecation warnings setting. Must be one of `:once`, `:warn`, or `:silent`. @raise [ArgumentError] if the value is not one of the supported values. @return [void]
# File lib/jwt/configuration/container.rb, line 45 def deprecation_warnings=(value) raise ArgumentError, "Invalid deprecation_warnings value #{value}. Supported values: #{DEPRECATION_WARNINGS_VALUES}" unless DEPRECATION_WARNINGS_VALUES.include?(value) @deprecation_warnings = value end
reset!()
click to toggle source
Resets the configuration to default values.
@return [void]
# 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