Highlighted
Contributor.
Contributor.
233 views

Web script with oauth hangs when authorizing

I'm scripting against a web site that is using oauth version 2.0. When it submits the authorization request, it will redirect to the redirect URL but is hangs. I found this message in the log "AADSTS50058%3a+A+silent+sign-in+request+was+sent+but+no+user+is+signed+in." along with a trace ID. 

I have correlated all values. 

Do I need to add headers? Does anybody have an example of web script using oauth 2.0?

I'm using LR 12.53 and Web-HTTP\HTML protocol.

Recording options

General: Recording
URL-Based
Advanced
Concurrent groups - checked
Web_custom_request only - checked
General: Scripting
Use protected application recording - checked
General: Code Generation
Async Scan - checked

Network: Mapping & Filtering
Socket Level Data

David

0 Likes
4 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Web script with oauth hangs when authorizing

@reinbodw, headers can indeed be very important.

I suggest to replay your login with e.g. Chrome and enable network tracing. It can be found in development tools (Press F12 in Chrome).

In this recording you can examine headers and other details. Compare those with you own script replay.

 

Success,

Erik

Signature:
Reward community members who take time to respond and help.
0 Likes
Highlighted
Contributor.
Contributor.

Re: Web script with oauth hangs when authorizing

Hi,
I see where the headers are located and their values. I cannot find where to capture the values in the server response. Do I need to add requests to get the tokens and values used in the headers?
David
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Web script with oauth hangs when authorizing

@reinbodw, If you see 'spontaneous' header values, it might be that those headers with values are generated by java script running the the browser, or sometimes 'hard' coded in java script (but these values might be encoded).

So you really need to have a clear understanding of the protocol oAuth 2.0. Your best change to resolve this is to discuss this with the (security) architect of your application.He might deliver you the java script code and you might be able to run it from your C code (there is a LR-function to do this).

You hit the advanced topics on LR scripting.

An escape (only for low user numbers) is to switch to TruClient for it runs all java script code of the browser as well.

 

Success,

Erik

Signature:
Reward community members who take time to respond and help.
0 Likes
Highlighted
Contributor.
Contributor.

Re: Web script with oauth hangs when authorizing

Eric,
Thanks for the information and your time. I will be discussing this with the development team.
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.