Class: OmniAuth::Strategies::PagerDuty
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::PagerDuty
- Defined in:
- lib/omniauth/strategies/pagerduty.rb
Instance Method Summary collapse
- #authorize_params ⇒ Object
- #callback_url ⇒ Object
- #me ⇒ Object
- #raw_info ⇒ Object
- #request_phase ⇒ Object
Instance Method Details
#authorize_params ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/omniauth/strategies/pagerduty.rb', line 19 def 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_url ⇒ Object
44 45 46 |
# File 'lib/omniauth/strategies/pagerduty.rb', line 44 def callback_url .redirect_url || (full_host + callback_path) end |
#me ⇒ Object
39 40 41 42 |
# File 'lib/omniauth/strategies/pagerduty.rb', line 39 def me access_token.[:mode] = :header @me ||= access_token.get('users/me', headers: { 'Accept' => 'application/vnd.pagerduty+json;version=2' }).parsed end |
#raw_info ⇒ Object
35 36 37 |
# File 'lib/omniauth/strategies/pagerduty.rb', line 35 def raw_info @raw_info ||= {} end |
#request_phase ⇒ Object
15 16 17 |
# File 'lib/omniauth/strategies/pagerduty.rb', line 15 def request_phase super end |