Class: OmniAuth::Strategies::Box

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

Overview

OmniAuth strategy for Box OAuth2.

Instance Method Summary collapse

Instance Method Details

#callback_urlObject

Ensure token exchange uses a stable callback URI that matches provider config.



53
54
55
# File 'lib/omniauth/strategies/box.rb', line 53

def callback_url
  options[:callback_url] || super
end

#query_stringObject

Prevent authorization response params from being appended to redirect_uri.



58
59
60
61
62
# File 'lib/omniauth/strategies/box.rb', line 58

def query_string
  return "" if request.params["code"]

  super
end

#raw_infoObject



48
49
50
# File 'lib/omniauth/strategies/box.rb', line 48

def raw_info
  @raw_info ||= access_token.get("users/me").parsed
end