Show Table of Contents
3.3.2. Making an OAuth Request
Usually an OAuth client library is used to generate the request. An example OAuth request using
curl is shown here to aid in understanding how it works.
Example 3.1. OAuth Request Example Using curl
$In the example above architectures are listed using OAuth for authentication. The request is attempted as a user with login User1. If mapping is enabled in the Foreman settings, the result will only include architectures that user User1 can see. Note that the signature was constructed manually, this should change with anycurl '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 change. Also, the signature reflects every parameter, HTTP method, and URI change. Therefore it is recommend to use an OAuth client library to construct all OAuth parameters.

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.