Final: OpenID Authentication 2.0 – Final : 12. Extensions : 俺約/メモ

 

12.  Extensions

An Extension to OpenID Authentication is a protocol that "piggybacks" on the authentication request and response. Extensions are useful for providing extra information about an authentication request or response as well as providing extra information about the subject of the authentication response.

(AuthReq/AuthResの上に肩車みたいにのっかったプロトコル。AuthReq/AuthResに関する追加情報とか、AuthResのサブジェクトに関する追加情報をかに使う)

OpenID extensions are identified by a Type URI. The Type URI MAY be used as the value of an <xrd:Type> element of an OpenID <xrd:Service> element in an XRDS document associated with a Claimed Identifier. The Type URI is also used to associate key-value pairs in messages with the extension.

(Type URIでエクステンションを識別します。TypeURIは<xrd:Service>の<xrd:Type>値であらわす。また、メッセージにkey-valueペアで利用される)

To associate keys and values in a message with an extension, the key MUST be associated with the Type URI. To associate keys with a Type URI, establish an alias by adding a key prefixed with "openid.ns." and ending with the alias text whose value is the Type URI. Once an alias has been established, all pairs in the message whose keys start with "openid." followed by the alias text, followed by a period or the end of the key are associated with that extension. This mechanism is similar to the XML namespaces.

(key/valueを関連付けるためにはkeyがTypeURIで関連付けられている必要

A namespace alias MUST NOT contain a period and MUST NOT be the same as another namespace alias in the same message.(ネームスペースにペリオドいれちゃだめ。複数のネームスペースが出てきてはだめ。) A namespace alias also MUST NOT be in the following list of disallowed aliases(以下のアイリアスをエクステンションに使ってはいけません):

  • assoc_handle
  • assoc_type
  • claimed_id
  • contact
  • delegate
  • dh_consumer_public
  • dh_gen
  • dh_modulus
  • error
  • identity
  • invalidate_handle
  • mode
  • ns
  • op_endpoint
  • openid
  • realm
  • reference
  • response_nonce
  • return_to
  • server
  • session_type
  • sig
  • signed
  • trust_root

A namespace MUST NOT be assigned more than one alias in the same message. If a message is a response to another message, the response MAY use a different alias to refer to the same namespace. (namespaceは同じメッセージに1つだけ。もしもメッセージが別のメッセージへの応答であれば、応答では別のエイリアスを使って同じネームスペースを参照してもよい)

Non-normative example: (いい加減な例)

An extension’s type URI is "<http://example.com/ext/1.0>&quot;. (エクステンションタイプURI)

openid.ns.x=http://example.com/ext/1.0

openid.x=example

openid.x.foo=bar

openid.xx=notx

In this example, the keys "openid.x" and "openid.x.foo" are associated with the extension; the "openid.xx" key is not.

( "opneid.x" キーと "openid.x.foo" キーは エクステンションに割り当てられています。けど"openid.xx"キーは関係ありません)

Extensions MUST NOT define multiple parameters with the same name. Extensions that need to send multiple values for the same parameter name must define their own conventions for doing so. (同じ名前に複数のパラメータを割り当ててはいけません。複数の値を送信したければ独自に別な方法を考える)

Final: OpenID Authentication 2.0 – Final

カテゴリー: 未分類 パーマリンク

コメントを残す