Method: AruxApp::API::Auth#initialize
- Defined in:
- lib/arux_app/api/auth.rb
#initialize(options = {}) ⇒ Auth
Returns a new instance of Auth.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/arux_app/api/auth.rb', line 31 def initialize( = {}) self.client_id = [:client_id] self.client_secret = [:client_secret] self.redirect_uri = [:redirect_uri] self.js_callback = [:js_callback] self.login_mechanism = [:login_mechanism] || 'redirect' self.element = [:element] self.district_subdomain = [:district_subdomain] self.current_user_uuid = [:current_user_uuid] raise API::InitializerError.new(:client_id, "can't be blank") if self.client_id.to_s.empty? raise API::InitializerError.new(:client_secret, "can't be blank") if self.client_secret.to_s.empty? raise API::InitializerError.new(:redirect_uri, "can't be blank") if self.redirect_uri.to_s.empty? end |