модуль ActionController::HttpAuthentication::Digest::ControllerMethods
Публичные методы экземпляров
authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure) Показать исходный код
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 193 def authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure) authenticate_with_http_digest(realm, &password_procedure) || request_http_digest_authentication(realm, message) end
Проверка подлинности с использованием HTTP Digest или, в противном случае, вывод HTTP-заголовка, запрашивающего от клиента отправку Digest.
См. ActionController::HttpAuthentication::Digest для примера использования.
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 199 def authenticate_with_http_digest(realm = "Application", &password_procedure) HttpAuthentication::Digest.authenticate(request, realm, &password_procedure) end
Проверка подлинности с использованием HTTP Digest. Возвращает true, если проверка подлинности успешна, и false в противном случае.
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 205 def request_http_digest_authentication(realm = "Application", message = nil) HttpAuthentication::Digest.authentication_request(self, realm, message) end
Вывод HTTP-заголовка, запрашивающего от клиента отправку Digest для проверки подлинности.
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.