модуль ActionController::HttpAuthentication::Digest::ControllerMethods
Открытые методы экземпляра
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 197 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 203 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 209 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.