Class: HolisticAuth::Configuration

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

Overview

Configuration class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



28
29
30
31
32
33
34
35
# File 'lib/holistic_auth/configuration.rb', line 28

def initialize
  @providers = {
    stub: provider_for(:stub).new,
    google: provider_for(:google).new,
    ms_graph: provider_for(:ms_graph).new,
    outlook: provider_for(:outlook).new,
  }
end

Instance Attribute Details

#providersObject (readonly)

Returns the value of attribute providers.



25
26
27
# File 'lib/holistic_auth/configuration.rb', line 25

def providers
  @providers
end

#valid_applicationsObject

Returns the value of attribute valid_applications.



26
27
28
# File 'lib/holistic_auth/configuration.rb', line 26

def valid_applications
  @valid_applications
end

Instance Method Details

#add_secrets(provider_name, options = {}) ⇒ Object



46
47
48
49
# File 'lib/holistic_auth/configuration.rb', line 46

def add_secrets(provider_name, options = {})
  test_for_provider!(provider_name)
  @providers[provider_name].add_secrets(options)
end

#provider(provider_name) ⇒ Object



41
42
43
44
# File 'lib/holistic_auth/configuration.rb', line 41

def provider(provider_name)
  test_for_provider!(provider_name)
  @providers[provider_name]
end