0

I am trying to test againt a service that implements the OAuth 2.0 authentication protocol and I want to run the automation without using any browser elements. Is that possible and if so how?

What i am currently doing is opening a browser and then sending user/key combination and then on redirect, I get the access token from the URL which I then use in subsequent REST calls. but this method takes a bit of time and may not be completely reliable for running lots of tests.

Is there any way that I can programatically handle the initial handshake, i.e, send the user/key, get the permission request page and then accept it through c# as well and finally get the access token without any browser in the middle?

2 Answers 2

1

Check out DotNetOpenAuth - http://www.dotnetopenauth.net/

You should be able to write automated test cases quite simply

Sign up to request clarification or add additional context in comments.

Comments

0

You could try service account authentication for your test system. This approach replaces user interaction with cryptographically signed JSON Web Tokens (JWTs).

Google's implementation docs have some details.

1 Comment

From what I read, it seems this needs to have a server change. unfortunately I think the service I am using may not support JWTs and changing it wouldnt really be feasible at this point and isnt under my control. Is it a part of the OAuth spec of something google supports as an addition to minimum requirements

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.