Class: OmniAuth::Strategies::ChannelAdvisor

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

Constant Summary collapse

NAME_KEY =
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name".freeze
UID_KEY =
"urn:ca:claim:profile".freeze

Instance Method Summary collapse

Instance Method Details

#callback_urlObject



36
37
38
39
# File 'lib/omniauth/strategies/channel_advisor.rb', line 36

def callback_url
  override = options.redirect_uri
  override ? override : super
end

#info_hashObject



41
42
43
44
45
46
47
# File 'lib/omniauth/strategies/channel_advisor.rb', line 41

def info_hash
  @info_hash ||= Array(raw_info).each_with_object({}){|item, result|
    key = item["Type"]
    val = item["Value"]
    result[key] = val if (key && val)
  }
end

#raw_infoObject



49
50
51
# File 'lib/omniauth/strategies/channel_advisor.rb', line 49

def raw_info
  @raw_info ||= access_token.get('/oauth2/identity').parsed
end