Class: Conductor::AuthenticationSettings
- Inherits:
-
Object
- Object
- Conductor::AuthenticationSettings
- Defined in:
- lib/conductor/configuration/authentication_settings.rb
Overview
Authentication settings for Conductor server
Instance Attribute Summary collapse
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#key_secret ⇒ Object
Returns the value of attribute key_secret.
Instance Method Summary collapse
- #configured? ⇒ Boolean
-
#initialize(key_id: nil, key_secret: nil) ⇒ AuthenticationSettings
constructor
A new instance of AuthenticationSettings.
Constructor Details
#initialize(key_id: nil, key_secret: nil) ⇒ AuthenticationSettings
Returns a new instance of AuthenticationSettings.
8 9 10 11 |
# File 'lib/conductor/configuration/authentication_settings.rb', line 8 def initialize(key_id: nil, key_secret: nil) @key_id = key_id || ENV.fetch('CONDUCTOR_AUTH_KEY', nil) @key_secret = key_secret || ENV.fetch('CONDUCTOR_AUTH_SECRET', nil) end |
Instance Attribute Details
#key_id ⇒ Object
Returns the value of attribute key_id.
6 7 8 |
# File 'lib/conductor/configuration/authentication_settings.rb', line 6 def key_id @key_id end |
#key_secret ⇒ Object
Returns the value of attribute key_secret.
6 7 8 |
# File 'lib/conductor/configuration/authentication_settings.rb', line 6 def key_secret @key_secret end |
Instance Method Details
#configured? ⇒ Boolean
13 14 15 |
# File 'lib/conductor/configuration/authentication_settings.rb', line 13 def configured? !key_id.nil? && !key_secret.nil? && !key_id.empty? && !key_secret.empty? end |