Class: OpenidConfigParser::Config

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/openid_config_parser.rb

Overview

Config is a class that extends OpenStruct to provide a flexible object for accessing OpenID Connect configuration data. It allows access to configuration values both as methods (e.g., config.issuer) and as hash keys (e.g., config).

Example usage:

config = OpenidConfigParser.fetch_openid_configuration(endpoint)
puts config.issuer        # Method access
puts config[:issuer]      # Hash-like access

This class is designed to be used internally by the OpenidConfigParser module and is not intended to be instantiated directly by users.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



30
31
32
# File 'lib/openid_config_parser.rb', line 30

def [](key)
  send(key)
end

#[]=(key, value) ⇒ Object



34
35
36
# File 'lib/openid_config_parser.rb', line 34

def []=(key, value)
  send("#{key}=", value)
end