diff options
author | Dennis Schubert <mail@dennis-schubert.de> | 2020-02-12 00:35:10 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2020-02-12 01:53:14 +0300 |
commit | 45e8b54beabb7d1ba9a9f0909c3cc2d0d572a8e4 (patch) | |
tree | 7fd121601429907afceae9214263b28f65d0f5a4 /app | |
parent | 35da56109f9774a52386b175473241f89f7d7568 (diff) |
Check for status codes instead of relying on response.redirect?.
Rack did so much refactoring, we do not see a Response object here anymore.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/openid_connect/authorizations_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/api/openid_connect/authorizations_controller.rb b/app/controllers/api/openid_connect/authorizations_controller.rb index bc35f11b9..555a718b3 100644 --- a/app/controllers/api/openid_connect/authorizations_controller.rb +++ b/app/controllers/api/openid_connect/authorizations_controller.rb @@ -104,8 +104,9 @@ module Api end def handle_start_point_response(endpoint) - _status, header, response = endpoint.call(request.env) - if response.redirect? + status, header, _response = endpoint.call(request.env) + + if status.in?([301, 302, 303, 307, 308]) redirect_to header["Location"] else save_params_and_render_consent_form(endpoint) |