差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
pc:security:authentication:digest_authentication [2014/11/18 16:13]
tony [Digest Authentication]
pc:security:authentication:digest_authentication [2023/06/25 09:48] (目前版本)
行 1: 行 1:
 +{{tag>​security spring}}
 ====== Digest Authentication ====== ====== Digest Authentication ======
 ===== Sequence ===== ===== Sequence =====
行 6: 行 7:
   - Server回應驗證結果。   - Server回應驗證結果。
  
-  * realm: ​用於告訴user該輸入什麼account與password的訊息+  * realm: ​提示user此resource該輸入account與password。
   * qop: quality of protection,決定驗證字串的表達方式。步驟二中,server應提供所支援的方式,包含auth與auth-int。   * qop: quality of protection,決定驗證字串的表達方式。步驟二中,server應提供所支援的方式,包含auth與auth-int。
   * nonce: 用於某次請求的字串。可能是個timestamp。   * nonce: 用於某次請求的字串。可能是個timestamp。
行 21: 行 22:
 </​code>​ </​code>​
 ==== Postman ==== ==== Postman ====
 +與cURL最大差別在於要發兩次request,一次是為了拿nonce,一次是驗證並拿回結果。
   - 針對resource的URL發一次request。   - 針對resource的URL發一次request。
   - 從header內容中拿取realm與nonce。如果有opaque也要拿出來用。   - 從header內容中拿取realm與nonce。如果有opaque也要拿出來用。
行 30: 行 32:
   * [[http://​en.wikipedia.org/​wiki/​Digest_access_authentication|Digest Access Authentication]]   * [[http://​en.wikipedia.org/​wiki/​Digest_access_authentication|Digest Access Authentication]]
   * [[http://​www.hkpug.net/​2009/​02/​18/​%E7%94%A8-php-%E5%AF%A6%E7%8F%BE-http-%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89/​|用 PHP 實現 HTTP 身份驗證]]   * [[http://​www.hkpug.net/​2009/​02/​18/​%E7%94%A8-php-%E5%AF%A6%E7%8F%BE-http-%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89/​|用 PHP 實現 HTTP 身份驗證]]
 +  * [[https://​security.stackexchange.com/​questions/​165982/​http-digest-authentication-does-the-server-store-plaintext-passwords|HTTP Digest Authentication:​ Does the server store plaintext passwords?​]]