Show Table of Contents
3.3.2. OAuth 要求の作成
通常 OAuth クライアントライブラリーは要求の生成に使用します。ここでは
curl を使用した OAuth 要求がどのように機能するか理解いただけるように一例を紹介しています。
例3.1 OAuth 要求の例: curl の使用
$上記の例では、アーキテクチャーが OAuth を使用してリストされ、認証されます。この要求は、User1 のユーザーとしてログインを試行します。マッピングが Foreman の設定で有効な場合、結果にはユーザー User1 のみに表示可能なアーキテクチャーのみが含まれます。署名が手動で作成された場合には、curl 'https://satellite6.example.com/api/architectures' \-H 'Content-Type: application/json' \-H 'Accept: application/json,version=2' \-H 'FOREMAN-USER: User1' \-H 'Authorization: OAuth oauth_version="1.0",oauth_consumer_key="secretkey",oauth_signature_method="hmac-sha1",oauth_timestamp=1321473112,oauth_signature=Il8hR8/ogj/XVuOqMPB9qNjSy6E='
oauth_timestamp を変更すると変更されるはずです。また、署名はすべてのパラメーター、HTTP メソッド、URI の変更に反映されます。そのため、OAuth クライアントライブラリーを使用して OAuth パラメーターを構築することを推奨します。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.