Added parameter to enable http_basic auth promt fallback.
This commit is contained in:
parent
794075e440
commit
e183dc4fa9
1 changed files with 7 additions and 1 deletions
|
@ -177,9 +177,15 @@ class ApplicationController < ActionController::Base
|
|||
}
|
||||
end
|
||||
|
||||
def authentication_check
|
||||
def authentication_check( params = { basic_auth_promt: false } )
|
||||
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
|
||||
if result[:auth] == false
|
||||
render(
|
||||
|
|
Loading…
Reference in a new issue