Class: OmniAuth::Strategies::Mayun

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

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/omniauth/strategies/mayun.rb', line 16

def authorize_params
  super.tap do |params|
    %w[scope client_options].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]
        # to support omniauth-oauth2's auto csrf protection
        session['omniauth.state'] = params[:state] if v == 'state'
      end
    end
  end
end

#raw_infoObject



44
45
46
47
48
# File 'lib/omniauth/strategies/mayun.rb', line 44

def raw_info
 access_token.options[:param_name] = 'access_token'
  access_token.options[:mode] = :query
  @raw_info ||= access_token.get('/api/v5/user').parsed
end

#request_phaseObject



12
13
14
# File 'lib/omniauth/strategies/mayun.rb', line 12

def request_phase
  super
end