Class: OmniAuth::Strategies::Line

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

Instance Method Summary collapse

Instance Method Details

#callback_phaseObject

host changed


17
18
19
20
# File 'lib/omniauth/strategies/line.rb', line 17

def callback_phase
  options[:client_options][:site] = 'https://api.line.me'
  super
end

#callback_urlObject


22
23
24
25
# File 'lib/omniauth/strategies/line.rb', line 22

def callback_url
  # Fixes regression in omniauth-oauth2 v1.4.0 by https://github.com/intridea/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7
  options[:callback_url] || (full_host + script_name + callback_path)
end

#raw_infoObject

Require: Access token with PROFILE permission issued.


38
39
40
41
42
# File 'lib/omniauth/strategies/line.rb', line 38

def raw_info
  @raw_info ||= JSON.load(access_token.get('v2/profile').body)
rescue ::Errno::ETIMEDOUT
  raise ::Timeout::Error
end