Class: OmniAuth::Strategies::Teamwork
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Teamwork
- Defined in:
- lib/omniauth/strategies/teamwork.rb
Instance Method Summary collapse
Instance Method Details
#callback_url ⇒ Object
39 40 41 |
# File 'lib/omniauth/strategies/teamwork.rb', line 39 def callback_url [:redirect_uri] || (full_host + script_name + callback_path) end |
#location ⇒ Object
48 49 50 51 |
# File 'lib/omniauth/strategies/teamwork.rb', line 48 def location address = raw_info['address'] [address['city'], address['state']].join(' ').strip end |
#raw_info ⇒ Object
43 44 45 46 |
# File 'lib/omniauth/strategies/teamwork.rb', line 43 def raw_info url = "#{access_token.response.parsed.installation.api_end_point}me.json" @raw_info ||= access_token.get(url).parsed.person end |