From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/http/headers/authorization/index.html | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 files/ja/web/http/headers/authorization/index.html (limited to 'files/ja/web/http/headers/authorization') diff --git a/files/ja/web/http/headers/authorization/index.html b/files/ja/web/http/headers/authorization/index.html new file mode 100644 index 0000000000..eb2c53a8a2 --- /dev/null +++ b/files/ja/web/http/headers/authorization/index.html @@ -0,0 +1,92 @@ +--- +title: Authorization +slug: Web/HTTP/Headers/Authorization +tags: + - HTTP + - HTTP ヘッダー + - ヘッダー + - リクエストヘッダー + - リファレンス +translation_of: Web/HTTP/Headers/Authorization +--- +
{{HTTPSidebar}}
+ +

HTTP の Authorization 要求ヘッダーは、ユーザーエージェントがサーバーから認証を受けるための証明書を保持し、ふつうはサーバーが {{HTTPStatus("401")}} Unauthorized 状態と {{HTTPHeader("WWW-Authenticate")}} ヘッダーを返した後に使われます。

+ + + + + + + + + + + + +
ヘッダー種別{{Glossary("Request header", "リクエストヘッダー")}}
{{Glossary("Forbidden header name", "禁止ヘッダー名")}}いいえ
+ +

構文

+ +
Authorization: <type> <credentials>
+ +

ディレクティブ

+ +
+
<type>
+
認証の種類。一般的には "Basic" です。それ以外の種類は以下に記述されています。 + +
+
<credentials>
+
"Basic" 認証方式を使用している場合、認証情報は次のように構築されます。 +
    +
  • コロンで結合したユーザー名とパスワード (aladdin:opensesame)。
  • +
  • 結果の文字列は Base64 でエンコードされます (YWxhZGRpbjpvcGVuc2VzYW1l)。
  • +
+ +
+

メモ: Base64 エンコードは暗号化でもハッシュでもありません。この方法の安全性はクリアテキストで認証情報を送るのと同等です (Base64 は可逆エンコーディングです)。 Basic 認証は HTTPS との組み合わせで使用することをお勧めします。

+
+
+
+ +

+ +
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
+
+ +

Apache や nginx サーバーで HTTP Basic 認証を使用してサイトを保護する方法の例については、 HTTP authentication を参照してください。

+ +

仕様書

+ + + + + + + + + + + + + + + + + + +
仕様書題名
{{RFC("7235", "Authorization", "4.2")}}HTTP/1.1: Authentication
{{RFC("7617")}}The 'Basic' HTTP Authentication Scheme
+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf