方法
- 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