Class: OmniAuth::Strategies::PagerDuty

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

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



19
20
21
22
23
24
25
26
27
# File 'lib/omniauth/strategies/pagerduty.rb', line 19

def authorize_params
  super.tap do |params|
    %w[client_options].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]
      end
    end
  end
end

#callback_urlObject



44
45
46
# File 'lib/omniauth/strategies/pagerduty.rb', line 44

def callback_url
  options.redirect_url || (full_host + callback_path)
end

#meObject



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

def me
  access_token.options[:mode] = :header
  @me ||= access_token.get('users/me', headers: { 'Accept' => 'application/vnd.pagerduty+json;version=2' }).parsed
end

#raw_infoObject



35
36
37
# File 'lib/omniauth/strategies/pagerduty.rb', line 35

def raw_info
  @raw_info ||= {}
end

#request_phaseObject



15
16
17
# File 'lib/omniauth/strategies/pagerduty.rb', line 15

def request_phase
  super
end