Class: OmniAuth::Strategies::HerokuSSO
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::HerokuSSO
- Includes:
- OmniAuth::Strategy
- Defined in:
- lib/omniauth/strategies/heroku-sso.rb
Instance Method Summary collapse
Instance Method Details
#callback_phase ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/omniauth/strategies/heroku-sso.rb', line 20 def callback_phase resource_id = request.params['id'] provided_token = request.params['token'] = request.params['timestamp'].to_i return fail!( :session_expired ) unless current?( ) return fail!( :invalid_credentials ) unless token_matches?( provided_token, resource_id, ) super end |
#request_phase ⇒ Object
14 15 16 17 18 |
# File 'lib/omniauth/strategies/heroku-sso.rb', line 14 def request_phase response = Rack::Response.new response.redirect( .heroku_url ) response.finish end |