方法
- A
- R
实例公共方法
authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure) 链接
使用 HTTP Digest 进行身份验证,否则将渲染一个 HTTP 标头,请求客户端发送 Digest。
有关示例用法,请参阅 ActionController::HttpAuthentication::Digest。
源代码: 显示 | 在 GitHub 上
# 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
authenticate_with_http_digest(realm = "Application", &password_procedure) 链接
使用 HTTP Digest 进行身份验证。如果身份验证成功,则返回 true,否则返回 false。
源代码: 显示 | 在 GitHub 上
# 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
request_http_digest_authentication(realm = "Application", message = nil) 链接
渲染一个 HTTP 标头,请求客户端发送 Digest 进行身份验证。
源代码: 显示 | 在 GitHub 上
# 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