lib/maestrano.rb in maestrano-0.3.0 vs lib/maestrano.rb in maestrano-0.4.0
- old
+ new
@@ -56,10 +56,11 @@
# Maestrano Configuration block
def self.configure
self.config ||= Configuration.new
yield(config)
+ self.config.api_token = "#{self.config.app_id}:#{self.config.api_key}"
end
# Get configuration parameter value
# E.g:
# Maestrano.param('api_key')
@@ -67,15 +68,16 @@
def self.param(parameter)
self.config.param(parameter)
end
class Configuration
- attr_accessor :environment, :api_key, :sso_enabled,
+ attr_accessor :environment, :app_id, :api_key, :sso_enabled,
:app_host, :sso_app_init_path, :sso_app_consume_path, :user_creation_mode,
- :verify_ssl_certs, :api_version
+ :verify_ssl_certs, :api_version, :api_token
def initialize
@environment = 'test'
+ @app_id = nil
@api_key = nil
@sso_enabled = true
@app_host = 'http://localhost:3000'
@sso_app_init_path = '/maestrano/auth/saml/init'
@sso_app_consume_path = '/maestrano/auth/saml/consume'
\ No newline at end of file