Class: HolisticAuth::Configuration
- Inherits:
-
Object
- Object
- HolisticAuth::Configuration
- Defined in:
- lib/holistic_auth/configuration.rb
Overview
Configuration class
Instance Attribute Summary collapse
-
#providers ⇒ Object
readonly
Returns the value of attribute providers.
-
#valid_applications ⇒ Object
Returns the value of attribute valid_applications.
Instance Method Summary collapse
- #add_secrets(provider_name, options = {}) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #provider(provider_name) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
25 26 27 |
# File 'lib/holistic_auth/configuration.rb', line 25 def providers @providers end |
#valid_applications ⇒ Object
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, = {}) test_for_provider!(provider_name) @providers[provider_name].add_secrets() 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 |