Class: OmniAuth::Strategies::Hue

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/hue.rb

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/omniauth/strategies/hue.rb', line 33

def authorize_params
  params = super

  # Setting clientid (as opposed to the more normal client_id) is
  # specified by the documentation, but not required... but we set both
  # just in case
  params[:clientid] = options.client_id

  params[:appid] = params.delete(:app_id)
  params[:devicename] = params.delete(:device_name)
  params[:deviceid] = params.delete(:device_id)
  params
end

#raw_infoObject



47
48
49
# File 'lib/omniauth/strategies/hue.rb', line 47

def raw_info
  @raw_info ||= access_token.get("/v1/bridges").parsed
end