Class: AuthProxy::Config
- Inherits:
-
Object
- Object
- AuthProxy::Config
- Defined in:
- lib/auth_proxy/config.rb
Instance Attribute Summary collapse
-
#app_domain ⇒ Object
Returns the value of attribute app_domain.
-
#cookie_domain ⇒ Object
Returns the value of attribute cookie_domain.
-
#providers ⇒ Object
Returns the value of attribute providers.
-
#ssl ⇒ Object
Returns the value of attribute ssl.
-
#views_path ⇒ Object
Returns the value of attribute views_path.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #register(provider, display_name:, app_id:, app_secret:, options: {}, validator: nil) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/auth_proxy/config.rb', line 8 def initialize self.providers = {} end |
Instance Attribute Details
#app_domain ⇒ Object
Returns the value of attribute app_domain.
2 3 4 |
# File 'lib/auth_proxy/config.rb', line 2 def app_domain @app_domain end |
#cookie_domain ⇒ Object
Returns the value of attribute cookie_domain.
3 4 5 |
# File 'lib/auth_proxy/config.rb', line 3 def @cookie_domain end |
#providers ⇒ Object
Returns the value of attribute providers.
4 5 6 |
# File 'lib/auth_proxy/config.rb', line 4 def providers @providers end |
#ssl ⇒ Object
Returns the value of attribute ssl.
5 6 7 |
# File 'lib/auth_proxy/config.rb', line 5 def ssl @ssl end |
#views_path ⇒ Object
Returns the value of attribute views_path.
6 7 8 |
# File 'lib/auth_proxy/config.rb', line 6 def views_path @views_path end |
Instance Method Details
#register(provider, display_name:, app_id:, app_secret:, options: {}, validator: nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/auth_proxy/config.rb', line 12 def register(provider, display_name:, app_id:, app_secret:, options: {}, validator: nil) [:callback_path] ||= "/auth/#{provider}/callback" providers[provider.to_s] = { provider: provider, display_name: display_name, app_id: app_id, app_secret: app_secret, validator: validator, options: } end |