<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <dfn><code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code></dfn> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP認証</anchor>のための<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">クライアント</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> を指定するものです。</p><section><h1>仕様書</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <strong><cite xml:lang="en">RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication</cite> (<time>2014-09-11 10:01:28 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7235#section-4.2">https://tools.ietf.org/html/rfc7235#section-4.2</anchor-external></strong></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> <cite xml:lang="en">RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication</cite> (<time>2014-09-11 10:01:28 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7235#section-5.1.2">https://tools.ietf.org/html/rfc7235#section-5.1.2</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite xml:lang="en">RFC 2326 - Real Time Streaming Protocol (RTSP)</cite> (<time>2014-10-19 05:24:58 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2326#section-12.5">http://tools.ietf.org/html/rfc2326#section-12.5</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <cite xml:lang="en">RFC 3261 - SIP: Session Initiation Protocol</cite> (<time>2014-08-15 14:48:03 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc3261#section-20.7">http://tools.ietf.org/html/rfc3261#section-20.7</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite xml:lang="en">RFC 3261 - SIP: Session Initiation Protocol</cite> (<time>2014-08-15 14:48:03 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc3261#section-22.2">http://tools.ietf.org/html/rfc3261#section-22.2</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end> <cite xml:lang="en">RFC 4976 - Relay Extensions for the Message Sessions Relay Protocol (MSRP)</cite> (<time>2014-10-18 23:44:47 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc4976#section-4.4">https://tools.ietf.org/html/rfc4976#section-4.4</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="24" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[24]</anchor-end> <cite xml:lang="en">RFC 7616 - HTTP Digest Access Authentication</cite> (<time>2015-11-10 07:05:08 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7616#section-3.6">https://tools.ietf.org/html/rfc7616#section-3.6</anchor-external></li></ul></refs></section><section><h1>意味</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者エージェント</anchor>が<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">起源鯖</anchor>において<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>するためのもので、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>されている<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">資源</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">保護空間</anchor>における<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者エージェント</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>情報を含む
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> を指定するものです <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal></src>。</p></section><section><h1>構文</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="410" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[410]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>の値は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> です
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="409" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;409</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="413" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;413</anchor-internal></src>。</p><figure class="railroad"><ol><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor></li></ol></figure><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> 複数の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> を同時に指定する方法はありません。</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor>、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">auth-param</anchor> も参照。</comment-p><section><h1>非標準の構文</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="34" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[34]</anchor-end> 
なぜか <code>Authorization</code> で独自の構文を採用する<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webサービス</anchor>が多々あります。</p><section><h1><code><var>鍵</var></code></h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="35" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[35]</anchor-end> 
<cite xml:lang="en">API guide — <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CKAN</anchor> 2.10.4 documentation</cite>, <time>2024-03-13T10:50:27.000Z</time>, <time>2024-04-13T12:37:37.915Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://docs.ckan.org/en/2.10/api/index.html#authentication-and-api-tokens">https://docs.ckan.org/en/2.10/api/index.html#authentication-and-api-tokens</anchor-external></p></section><section><h1><code><var>名前</var>:<var>鍵</var></code></h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[20]</anchor-end> (<time>2014-07-03 18:27:57 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://storage.sakura.ad.jp/pdf/base_storage_api_reference.pdf">http://storage.sakura.ad.jp/pdf/base_storage_api_reference.pdf</anchor-external></figcaption><blockquote><p>さくらの BASE Storage では、バケットレベルでの認証をサポートします</p><p>認証情報は、リクエストヘッダ内の Authorization フィールドに記述します</p><p>Authorization: &lt;ユーザ名&gt;:&lt;アクセストークン&gt;</p><p>認証パラメータ</p><p>パラメータ名 説明</p><p>Expires 署名(Signature)の 期限を エポックタイム で指定します</p><p>サーバは この時間以降のリクエストは破棄します</p><p>ユーザ名 コントロールパネルに表示される ユーザ名を指定します</p><p>アクセストークン コントロールパネルに表示される トークンを指定します</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="21" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[21]</anchor-end> <cite>API Authentication | DataSift Developers</cite>
(<time>2015-08-28 22:01:15 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://dev.datasift.com/docs/api/rest-api/api-authentication">http://dev.datasift.com/docs/api/rest-api/api-authentication</anchor-external></figcaption><blockquote><p>You need to include a header that contains:</p><p>    Authorization: datasift-user:your-datasift-api-key</p><p>Authorization: &lt;username&gt;:&lt;api_key&gt;</p></blockquote></figure></section><section><h1><code>key=<var>鍵</var></code></h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="421" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[421]</anchor-end> <cite>GCM HTTP Connection Server | Android Developers</cite>
( (<time>2014-09-01 09:58:32 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.android.com/google/gcm/http.html">https://developer.android.com/google/gcm/http.html</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="22" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[22]</anchor-end> <cite>Push Notifications on the Open Web | Web Updates - Google Developers</cite>
(<time>2015-11-20 02:42:52 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web">https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web</anchor-external></figcaption><blockquote><p>curl --header &quot;Authorization: key=&lt;YOUR_API_KEY&gt;&quot;</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="23" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[23]</anchor-end> <cite xml:lang="en">Implementing an HTTP Connection Server  |  Cloud Messaging  |  Google Developers</cite>
(<time>2015-10-21 05:19:34 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developers.google.com/cloud-messaging/http">https://developers.google.com/cloud-messaging/http</anchor-external></figcaption><blockquote><p>Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="27" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[27]</anchor-end> <cite xml:lang="ja">複数の端末にメッセージを送信する  |  Firebase</cite>
( (<time>2017-02-24 05:39:23 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://firebase.google.com/docs/cloud-messaging/js/send-multiple">https://firebase.google.com/docs/cloud-messaging/js/send-multiple</anchor-external></figcaption><blockquote><p>https://fcm.googleapis.com/fcm/send</p><p>Content-Type: application/json</p><p>Authorization: key=AIzaSyC...akjgSX0e4</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="28" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[28]</anchor-end> <cite xml:lang="ja">Firebase Cloud Messaging サーバーについて  |  Firebase</cite>
( (<time>2017-02-24 05:39:30 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://firebase.google.com/docs/cloud-messaging/server">https://firebase.google.com/docs/cloud-messaging/server</anchor-external></figcaption><blockquote><p>Authorization: key=YOUR_SERVER_KEY </p><p>これがサーバーキーであることを確認してください。この値は、Firebase console の <strong>[</strong>設定<strong>]</strong> ペインの <strong>[</strong>クラウド メッセージング<strong>]</strong> タブで確認できます。Android、iOS、およびブラウザのキーは、FCM によって拒否されます。</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="30" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[30]</anchor-end> <cite xml:lang="ja">以前の HTTP から HTTP v1 に移行する  |  Firebase</cite>
(<time>2020-01-22 07:00:50 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://firebase.google.com/docs/cloud-messaging/migrate-v1">https://firebase.google.com/docs/cloud-messaging/migrate-v1</anchor-external></figcaption><blockquote><p>旧</p><p>Authorization: key=AIzaSyZ-1u...0GBYzPu7Udno5aA</p><p>新</p><p>Authorization: Bearer ya29.ElqKBGN2Ri_Uz...HnS_uNreA</p></blockquote></figure></section></section></section><section><h1>文脈</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は通常
<code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">401</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>を受け取った後の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>で使いますが、
必ずしもそうでなくても構いません <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal></src>。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="48" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[48]</anchor-end> 通常 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>は <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">401</anchor></code> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>を受け取った後に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>のための情報を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者</anchor>に求める<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ダイアログボックス</anchor>を表示し、
そこで入力された情報を用いて再度 <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>付きの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>を繰り返すことによって<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>の通過を試みます。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="402" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[402]</anchor-end> しかし最初から <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>付きで<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>を送ることも認められています。
例えば <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>は以前<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者</anchor>が入力した<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>のための情報を記録しておき、
以後それを自動的に使うことがあります。また、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>以外の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者エージェント</anchor>は、
実行時の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">引数</anchor>などから予め<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>のための情報を受けとっておき、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>送信時にいきなりそれを使うように実装されていることもあります。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>が<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認可</anchor>された場合で <code xmlns="http://www.w3.org/1999/xhtml" class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">realm</anchor></code>
が指定されていた場合には、同じ <code xmlns="http://www.w3.org/1999/xhtml" class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">realm</anchor></code>
の他の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>に対しても同じ <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> が有効であると考えられます <src><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal></src>。</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> この<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は複数指定できます。</p></section><section><h1>処理</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP認証</anchor>も参照してください。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="403" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[403]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> 欄付きの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>に対し、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">起源鯖</anchor>はそれを使って<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">認証</anchor>できない場合に
<code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">401</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>を返す<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">べきです</strong></anchor>
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="407" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;407</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="416" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;416</anchor-internal></src>。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="404" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[404]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 1945</anchor> は <code xmlns="http://www.w3.org/1999/xhtml" class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> 欄付きの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>に対し、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">起源鯖</anchor>はそれを受け付ける意思が (今後も)
ない場合、 <code xmlns="http://www.w3.org/1999/xhtml" class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">403</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>を返すことができるとされていました <src><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="405" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;405</anchor-internal></src>。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2068</anchor> にはこの用法は明記されていません。</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="406" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[406]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">プロキシ</anchor>は、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>の <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>を変更しては<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">なりません</strong></anchor> <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="405" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;405</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="408" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;408</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="417" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;417</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="24" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;24</anchor-internal></src>。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>の有無は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ</anchor>に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">蓄積</anchor>できるかに影響します。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">詳しくは<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ可能性</anchor>を参照。</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="47" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[47]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 1945</anchor> では <code xmlns="http://www.w3.org/1999/xhtml" class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> 欄を含む<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ可能</anchor>では<em xmlns="http://www.w3.org/1999/xhtml">無い</em>とされていました
<src><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="46" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;46</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="405" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;405</anchor-internal></src>。</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="412" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[412]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2068</anchor> と <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2616</anchor> では、 <code xmlns="http://www.w3.org/1999/xhtml" class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Cache-Control:</anchor></code> によって<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ可能性</anchor>を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">起源鯖</anchor>側で指定できるようになっています
(<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="411" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;411</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="415" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;415</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="418" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;418</anchor-internal>)。</comment-p></section><section><h1><code class="HTTP" xml:lang="en">Authorization:</code> を使わない credentials の指定</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> は <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> 以外によって指定することも禁止されてはいません
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;16</anchor-internal></src> が、 <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> は自動的に
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Cache-Control:</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">private</anchor></code> のような効果を持つ
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ可能性</anchor>参照。) のに対し、それ以外の方法では自動的には<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ</anchor>が禁止されませんから、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>または<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>の <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Cache-Control:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>で明示的に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">キャッシュ</anchor>を制御する必要が生じます。</p><section><h1>WSSE</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WSSE</anchor> では <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Authorization:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は指定しないか形式的に指定するだけで、
実際の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> は <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">X-WSSE:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>に指定することとなっています。</p></section><section><h1>OAuth 1.0</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">OAuth 1.0</anchor> では <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">credentials</anchor> を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>の<code>Authorization:</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">HTTPヘッダー</title></anchor>に指定することもできますが、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求URL</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">query<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">URL query</title></anchor> に指定したり、
<code>application/x-www-form-urlencoded</code> な <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">payload body</anchor>
に含めたりもできます。
<sw-see xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"> <anchor>要求引数</anchor> </sw-see></p></section><section><h1>OAuth 2.0</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="29" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[29]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">OAuth 2.0</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">bearer</anchor> は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>の
<code>Authorization:</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">HTTPヘッダー</title></anchor>に指定することもできますが、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求URL</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">query<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">URL query</title></anchor> に指定したり、
<code>application/x-www-form-urlencoded</code> な <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">payload body</anchor>
に含めたりもできます。
<sw-see xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"> <code xmlns="http://www.w3.org/1999/xhtml">Bearer</code> </sw-see></p></section><section><h1>Web API</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="32" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[32]</anchor-end> 
各種
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webサービス</anchor>の提供する
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web API</anchor>
は、
自社サービス専用の独自の方法
(独自の
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTPヘッダー</anchor>、
独自の 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">query parameter</anchor>
など)
を使った指定方法を定めていることが、
割とよくあります。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="33" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[33]</anchor-end> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">歴史的経緯</anchor> (21世紀初頭からサービスを続けているとか) を除けば、
そのような標準的でない方法を採用するメリットは皆無に等しいです。
新しいサービスがそのような手法を採っているとしたら、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor>
に詳しくない人が設計した可能性を疑わざるを得ません。</p></section></section><section><h1>関連</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="25" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[25]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>で <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">challenge</anchor> を指定する
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WWW-Authenticate:</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>と似ています。</p></section><section><h1>歴史</h1><section><h1>誕生</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="44" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[44]</anchor-end> <cite>Request Headers in the HTTP protocol</cite>
( (<time>2001-11-29 11:01:38 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z9">http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z9</anchor-external></li></ul></refs></section><section><h1>RFC 第1世代</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="46" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[46]</anchor-end> <cite xml:lang="en">RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0</cite> (<time>2012-02-18 23:25:56 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc1945#section-10.2">http://tools.ietf.org/html/rfc1945#section-10.2</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="405" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[405]</anchor-end> <cite xml:lang="en">RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0</cite> (<time>2012-02-18 23:25:56 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc1945#page-48">http://tools.ietf.org/html/rfc1945#page-48</anchor-external></li></ul></refs></section><section><h1>RFC 第2世代</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="407" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[407]</anchor-end> <cite xml:lang="en">RFC 2068 - Hypertext Transfer Protocol -- HTTP/1.1</cite> (<time>2012-02-18 23:30:14 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2068#section-11">http://tools.ietf.org/html/rfc2068#section-11</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="408" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[408]</anchor-end> <cite xml:lang="en">RFC 2068 - Hypertext Transfer Protocol -- HTTP/1.1</cite> (<time>2012-02-18 23:30:14 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2068#page-66">http://tools.ietf.org/html/rfc2068#page-66</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="409" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[409]</anchor-end> <strong><cite xml:lang="en">RFC 2068 - Hypertext Transfer Protocol -- HTTP/1.1</cite> (<time>2012-02-18 23:30:14 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2068#section-14.8">http://tools.ietf.org/html/rfc2068#section-14.8</anchor-external></strong></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="415" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[415]</anchor-end> <cite xml:lang="en">RFC 2069 - An Extension to HTTP : Digest Access Authentication</cite> (<time>2012-02-26 10:05:21 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2069#page-9">http://tools.ietf.org/html/rfc2069#page-9</anchor-external></li></ul></refs></section><section><h1>RFC 第3世代</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="418" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[418]</anchor-end> <cite xml:lang="en">RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication</cite> (<time>2012-01-09 21:04:30 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2617#section-3.2.2.5">http://tools.ietf.org/html/rfc2617#section-3.2.2.5</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="413" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[413]</anchor-end> <strong><cite xml:lang="en">RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1</cite> (<time>2012-01-09 20:55:20 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2616#section-14.8">http://tools.ietf.org/html/rfc2616#section-14.8</anchor-external></strong></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="416" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[416]</anchor-end> <cite xml:lang="en">RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication</cite> (<time>2012-01-09 21:04:30 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2617#page-4">http://tools.ietf.org/html/rfc2617#page-4</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="417" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[417]</anchor-end> <cite xml:lang="en">RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication</cite> (<time>2012-01-09 21:04:30 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2617#page-5">http://tools.ietf.org/html/rfc2617#page-5</anchor-external></li></ul></refs><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="45" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[45]</anchor-end> RFC 1945 (HTTP/1.0) 10.2; RFC 2068・2616 (HTTP/1.1) 14.8 Authorization</figcaption><blockquote><p>A user agent that wishes to authenticate itself with a server--
usually, but not necessarily, after receiving a 401 response--<del><del><ins>{1945}</ins> may</del> <ins><ins>{2068}</ins> MAY</ins> do</del> <ins><ins>{2616}</ins> does</ins>
so by including an Authorization request-header field with the
request. The Authorization field value consists of credentials
containing the authentication information of the user agent for the
realm of the resource being requested.</p></blockquote><p>サーバーに (普通は、でも必要ではないけど、 401 応答を受け取った後に)、
認証されたいと思う利用者代理者は、 Authorization 要求頭欄を要求に
含めることでそう出来ます。 Authorization 欄の値は
要求されている資源の領域に対しての利用者代理者の認証情報を含んだ
証明書で構成されます。</p><blockquote><ul><li>Authorization  = &quot;Authorization&quot; &quot;:&quot; credentials</li></ul></blockquote><blockquote><p>HTTP access authentication is described in <del><ins>{1945・2068}</ins> section 11</del> <ins><ins>{2616}</ins> &quot;HTTP Authentication: Basic and Digest Access Authentication&quot; [43</ins>]. If a request
is authenticated and a realm specified, the same credentials <del><ins>{1945}</ins> should</del> <ins><ins>{2068}</ins> SHOULD</ins>
be valid for all other requests within this realm <ins><ins>{2616}</ins> (assuming that the authentication scheme itself does not require otherwise, such as credentials that vary according to a challenge value or using synchronized clocks)</ins>.</p></blockquote><p>HTTP 接続認証は『HTTP 認証: 基本接続認証と要約接続認証』
で説明されています。要求が認証されて領域が指定されていれば、
同じ証明書が当該領域内のすべての他の要求に対して妥当である
<strong>べきです</strong>。 (認証方式自体はそうでないことを必要としない
(例えば挑戦値により変化する証明書や同期時計の使用が無い)
と仮定します。)</p><delete xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><blockquote xmlns="http://www.w3.org/1999/xhtml"><p><ins>{1945}</ins> Responses to requests containing an Authorization field are not
cachable.</p></blockquote><p xmlns="http://www.w3.org/1999/xhtml"><code class="HTTP">Authorization</code> 欄を含んだ要求に対する応答はキャッシュ可能ではありません。</p></delete><insert xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="411" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[411]</anchor-end> </p><blockquote xmlns="http://www.w3.org/1999/xhtml"><p><ins>{2068〜}</ins> When a shared cache (see section 13.7) receives a request containing
an Authorization field, it MUST NOT return the corresponding response
as a reply to any other request, unless one of the following specific
exceptions holds:</p></blockquote><p xmlns="http://www.w3.org/1999/xhtml">共有キャッシュが Authorization 欄を含んだ要求を受け取った時、
他のどの要求への返信としても対応する応答を返しては<strong>いけません</strong>。
但し次のうちのいずれかの例外を除きます。</p><blockquote xmlns="http://www.w3.org/1999/xhtml"><ol><li>1. If the response includes the <del><ins>{2068}</ins> &quot;proxy-revalidate&quot; Cache-Control</del> <ins><ins>{2616}</ins> &quot;s-maxage&quot; cache-control</ins>
directive, the cache MAY use that response in replying to a
subsequent request<del>, but <ins>{2068}</ins> </del><ins>. But (if the specified maximum age has passed) <ins>{2616}</ins></ins> a proxy cache MUST first revalidate it with
the origin server, using the request-headers from the new request
to allow the origin server to authenticate the new request. <ins><ins>{2616}</ins> (This is the defined behavior for s-maxage.) If the response includes &quot;s-maxage=0&quot;, the proxy MUST always revalidate it before re-using it.</ins></li><li>2. If the response includes the &quot;must-revalidate&quot; <del>Cache-Control</del> <ins>cache-control</ins>
directive, the cache MAY use that response in replying to a
subsequent request<del>, but</del><ins>. But if the response is stale, </ins> all caches MUST first revalidate it with
the origin server, using the request-headers from the new request
to allow the origin server to authenticate the new request.</li><li>3. If the response includes the &quot;public&quot; <del>Cache-Control</del> <ins>cache-control</ins> directive, it <del>may</del> <ins>MAY</ins> be returned in reply to any subsequent request.</li></ol></blockquote><ol xmlns="http://www.w3.org/1999/xhtml"><li>応答が &quot;s-maxage&quot; cache-control 指令を含んでいたら、キャッシュは
後続要求に返信するのにその応答を使っても<strong>構いません</strong>。
しかし (指定された最大年令が経過したら) 串キャッシュはまず
源サーバーと再検証し<strong>なければなりません</strong>。
そのとき新しい要求からの要求頭を使って源サーバーが新しい要求を
認証出来るようにします。 (これは s-maxage に定義された振舞いです。)
応答が &quot;s-maxage=0&quot; を含んでいる場合、串は再利用する前に常に
再検証し<strong>なければなりません</strong>。</li><li>応答が &quot;must-revalidate&quot; cache-control 指示を含んでいる場合、
キャッシュはその応答を後続要求への返信に使っても<strong>構いません</strong>。
しかし要求が腐ったら全てのキャッシュはまず源サーバーで
再検証し<strong>なければなりません</strong>。この時新しい要求からの
要求頭を使って源サーバーが新しい要求を認証出来るようにします。</li><li>要求が &quot;public&quot; cache-control 指示を含んでいる場合、
どの後続要求への返信でも返して<strong>構いません</strong>。</li></ol></insert></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="422" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[422]</anchor-end> <cite xml:lang="en">RFC 3507 - Internet Content Adaptation Protocol (ICAP)</cite>
( (<time>2014-06-08 07:17:07 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc3507#page-14">http://tools.ietf.org/html/rfc3507#page-14</anchor-external></p></section><section><h1>RFC 第4世代</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <strong><cite xml:lang="en">RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication</cite> (<time>2014-09-11 10:01:28 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7235#section-4.2">https://tools.ietf.org/html/rfc7235#section-4.2</anchor-external></strong></li></ul></refs></section></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="419" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[419]</anchor-end> <cite>IRC logs: freenode / #whatwg / 20130506</cite>
( (<time>2013-05-16 21:16:27 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://krijnhoetmer.nl/irc-logs/whatwg/20130506">http://krijnhoetmer.nl/irc-logs/whatwg/20130506</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="420" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[420]</anchor-end> <cite xml:lang="en">Re: Re: Re: Fetch: HTTP authentication and CORS</cite>
( (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Hallvord Reiar Michaelsen Steen</anchor> 著, <time>2013-05-07 05:39:35 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0522.html">http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0522.html</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[19]</anchor-end> <cite xml:lang="en">HTTP Headers and Query String Parameters - Cloud Storage — Google Cloud Platform</cite>
(<time>2015-05-27 08:55:19 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://cloud.google.com/storage/docs/reference-headers#authorization">https://cloud.google.com/storage/docs/reference-headers#authorization</anchor-external></figcaption><blockquote><p>Valid Values</p><p>An authentication identifier ( OAuth | GOOG1 | AWS ) followed by one of the following:</p><p>A valid OAuth 2.0 token</p><p>An access key</p><p>A signature</p><p>Example</p><p>Authorization: OAuth 1/zVNpoQNsOSxZKqOZgckhpQ</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="26" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[26]</anchor-end> <cite xml:lang="en">Fix #198: give precedence to custom Authorization headers · whatwg/fetch@9b18866</cite>
(<time>2016-01-22 23:28:02 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/fetch/commit/9b188662ab3d0319fe6e5fc10f034a9f10f7b069">https://github.com/whatwg/fetch/commit/9b188662ab3d0319fe6e5fc10f034a9f10f7b069</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="31" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[31]</anchor-end> <cite>SafariはBasic認証の結果でAuthorization: Bearerを上書きする - Qiita</cite>
(<time>2020-07-28 19:08:58 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://qiita.com/ksakiyama134/items/efad0e48464e0f501d76">https://qiita.com/ksakiyama134/items/efad0e48464e0f501d76</anchor-external></p></section></body></html>