Class: OmniAuth::Strategies::Idq
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Idq
- Defined in:
- lib/omniauth/strategies/idq.rb
Instance Method Summary collapse
-
#authorize_params ⇒ Object
Allow push_token param through.
-
#callback_url ⇒ Object
Need to patch the original callback_url method the original puts all params from query_string onto the callback url idQ does not support this behaviour.
-
#request_phase ⇒ Object
Patched request_phase.
- #request_phase_original ⇒ Object
Instance Method Details
#authorize_params ⇒ Object
Allow push_token param through
89 90 91 |
# File 'lib/omniauth/strategies/idq.rb', line 89 def super.merge(push_token: request.params['push_token'], response_to: 'delegated_authorization') end |
#callback_url ⇒ Object
Need to patch the original callback_url method the original puts all params from query_string onto the callback url idQ does not support this behaviour. However, we need the Omniauth feature to store k-v pairs from query string in the request.env for handling delegated authorization requests in a stateless fashion.
98 99 100 |
# File 'lib/omniauth/strategies/idq.rb', line 98 def callback_url full_host + script_name + callback_path end |
#request_phase ⇒ Object
Patched request_phase
78 79 80 81 82 83 84 85 86 |
# File 'lib/omniauth/strategies/idq.rb', line 78 def request_phase # If a push_token was passed in, we want to carry out a delegated authorization if request.params['push_token'] redirect client..({:redirect_uri => callback_url}.merge()) else # Otherwise proceed with the original omniauth-oauth2 request_phase request_phase_original end end |
#request_phase_original ⇒ Object
48 |
# File 'lib/omniauth/strategies/idq.rb', line 48 alias_method :request_phase_original, :request_phase |