Highlighted
Absent Member.
Absent Member.
1952 views

How to handle OAUTH Authorization

Hello,

Can any one please provide the solution for how to handle "OAUTH Authorization" in script?

I do this but still not worked.

web_add_auto_header("Authorization","OAuth {Auth_Token}");

web_add_header("Content-Type", "application/xml");

web_custom_request("login",
"URL=////////////",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=//////",
"Snapshot=t3.inf",
"Mode=HTML",
"Body={Auth_Token}=81e5441e2bafd7e4e3f372de507e6b1a0af4ff02ae25af997d0321afa8d6d89e&login=*******&password={PasswordParameter}",
EXTRARES,
"URL=/resources/css/dashboard.css", "Referer=/////////////////", ENDITEM,
LAST);

Thanks,

Vishal

 

 

0 Likes
3 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: How to handle OAUTH Authorization

Have you compared what's going over the wire with and without Vugen?

 

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to handle OAUTH Authorization

Hi,

You have to check whether the recorded OAuth is working or not. Add the web_add_header with the complete OAuth from the recorded request. If this is not working, you have to capture the JS used for the OAuth generation from the browser developer tool and generate the OAuth with tokens. Then use javascript function web_js_run to use it in the script.

 

Additional Info: In Jmeter tool, there is a separate plugin for OAuth for handling it

Regards,

Raghul M

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to handle OAUTH Authorization

Thanks for your reply, I'll check and let you guys know if anything.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.