方法
- 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 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
authenticate_with_http_digest(realm = "Application", &password_procedure) 链接
使用 HTTP Digest 进行身份验证。如果身份验证成功,则返回 true,否则返回 false。
源代码:显示 | 在 GitHub 上
# 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
request_http_digest_authentication(realm = "Application", message = nil) 链接
呈现 HTTP 标头,请求客户端发送 Digest 进行身份验证。
源代码:显示 | 在 GitHub 上
# 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