* 意味 [12] [[要求]]が[[認証]]された場合であって、 [[realm]] が指定されていた場合にあっては、 同じ [[credentials]] が同一の [[realm]] を共有するすべての[[要求]]に対しても妥当であるべきです。 [SRC[>>11]] * 構文 [3] >>1 によると[[空文字列]]も特に制限されていないみたいですね。 * 歴史 ** RFC 1945 [REFS[ - [11] [CITE@en[RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0]] ([TIME[2012-02-18 23:25:56 +09:00]] 版) ]REFS] ** RFC 2617 [1] > [PRE(ABNF code)[ realm = "realm" "=" realm-value realm-value = quoted-string ]PRE] > The realm directive (case-insensitive) is required for all authentication schemes that issue a challenge. The realm value (case-sensitive), in combination with the canonical root URL (the absoluteURI for the server whose abs_path is empty; see section 5.1.2 of [2]) of the server being accessed, defines the protection space. These realms allow the protected resources on a server to be partitioned into a set of protection spaces, each with its own authentication scheme and/or authorization database. The realm value is a string, generally assigned by the origin server, which may have additional semantics specific to the authentication scheme. Note that there may be multiple challenges with the same auth-scheme but different realms. * 統計 [4] [CITE@en[HTTP/1.1 WWW-Authenticate header]] ([TIME[2009-07-19 11:05:40 +09:00]] 版) * 例 [5] >>4 より > [PRE(HTTP example code)[ WWW-Authenticate: Basic realm="" ]PRE] [6] >>4 より > [PRE(HTTP example code)[ WWW-Authenticate: Basic ]PRE] [7] >>4 より > [PRE(HTTP example code)[ WWW-Authenticate: Basic realm = "You need ID", ]PRE] [8] >>4 より [PRE(HTTP example code)[ WWW-Authenticate: Basic realm= / ]PRE] [9] >>4 より [PRE(HTTP example code)[ WWW-Authenticate: Basic realm=BSI SkimmerPlus Server 1.0.0.20 / 1.0.0.30 ]PRE] * メモ [10] [[OAuth]] だと [CODE(HTTP)@en[[[realm]]]] は意味が無いのですが、指定することは認められています。 特に意味が無いので[[空文字列]]が指定されたりすることもあります。