Class: VagrantCloud::Auth::HCPConfig
- Inherits:
-
Struct
- Object
- Struct
- VagrantCloud::Auth::HCPConfig
- Defined in:
- lib/vagrant_cloud/auth.rb
Overview
HCP configuration for generating authentication tokens
Instance Attribute Summary collapse
-
#auth_path ⇒ Object
Returns the value of attribute auth_path.
-
#auth_url ⇒ Object
Returns the value of attribute auth_url.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#token_path ⇒ Object
Returns the value of attribute token_path.
Instance Method Summary collapse
-
#validate! ⇒ Object
Raise exception if any values are missing.
Instance Attribute Details
#auth_path ⇒ Object
Returns the value of attribute auth_path
22 23 24 |
# File 'lib/vagrant_cloud/auth.rb', line 22 def auth_path @auth_path end |
#auth_url ⇒ Object
Returns the value of attribute auth_url
22 23 24 |
# File 'lib/vagrant_cloud/auth.rb', line 22 def auth_url @auth_url end |
#client_id ⇒ Object
Returns the value of attribute client_id
22 23 24 |
# File 'lib/vagrant_cloud/auth.rb', line 22 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret
22 23 24 |
# File 'lib/vagrant_cloud/auth.rb', line 22 def client_secret @client_secret end |
#token_path ⇒ Object
Returns the value of attribute token_path
22 23 24 |
# File 'lib/vagrant_cloud/auth.rb', line 22 def token_path @token_path end |
Instance Method Details
#validate! ⇒ Object
Raise exception if any values are missing
24 25 26 27 28 29 |
# File 'lib/vagrant_cloud/auth.rb', line 24 def validate! [:client_id, :client_secret, :auth_url, :auth_path, :token_path].each do |name| raise ArgumentError, "Missing required HCP authentication configuration value: HCP_#{name.to_s.upcase}" if self.send(name).to_s.empty? end end |