Added parameter to enable http_basic auth promt fallback.

This commit is contained in:
Thorsten Eckel 2015-06-22 12:56:09 +02:00
parent 794075e440
commit e183dc4fa9

View file

@ -177,9 +177,15 @@ class ApplicationController < ActionController::Base
} }
end end
def authentication_check def authentication_check( params = { basic_auth_promt: false } )
result = authentication_check_only result = authentication_check_only
# check if basic_auth fallback is possible
if params[:basic_auth_promt] && result[:auth] == false
return request_http_basic_authentication
end
# return auth not ok # return auth not ok
if result[:auth] == false if result[:auth] == false
render( render(