In OAuth 1.0 authorization, system asks for the following attributes:
- Signature Method (Supports HMAC-SHA1, PLAINTEXT)
- Consumer Key
- Consumer Secret
After filling these attributes, user need to follow the two steps mentioned below:
- Step 1: Access Token Generator (Optional)
If you already have the access token key and secret (generated from external application) then you can skip this step completely otherwise this step is required. Fill in the following details to complete this step:
After filling the above attributes, click on "Authorize & Generate Access Token". System will redirect user to authorize the consumer provided in a popup window (If popup window doesn't open then please check in the address bar whether popups are blocked or not. If popups are blocked then allow access to complete authorization process.). After successful authorization, close the popup window and click on "Refresh" button in previous window, to fill the access token key/secret in step 2 automatically.
- Request Token URL
- Authorize URL
- Access Token URL
Step 2: If already having the access token or generated from Step 1
If you have generated the access token key/secret pair from any external application, then just fill the details and save the authorization. And if you have completed the step 1, then click on refresh to fill these details automatically by the system.
Let us take an example of twitter authorization (OAuth 1.0A)
- First provide the OAuth 1.0 details like Signature method, consumer key, consumer secret and scope (Optional).
- Then scroll down and go to step 1 (Access Token Generator). This step is optional only If you already have the access token key and secret obtained via some external utility.
- If don't have access token key and secret then fill in the deails asked by step 1 and click on "Authorize & Generate Access Token" button to proceed. System will redirect you to twitter's page to authorize your app.
- Click on "Authorize app" button to proceed. Twitter will redirect you to the vREST page as shown below:
- Click on link provided on the previous screen to return to your authorization screen. Access Token details will be shown in Step 2 automatically as shown in figure.
- Now you have successfully configured twitter oauth. You can now use it in your test cases like below: