Using DotNetOpenAuth, we've succesfully implemented asynchronous 2- and 3-legged authentication.
However, we are now facing a situation where we need to perform synchronous 2-legged authentication. At the moment the user presses a button to retrieve data, we need to sequentially 1) obtain a token and 2) perform the data request using this token. An asynchronous 2-legged authentication with callback would result in the retrieval failing the first time and -after the authentication is complete- succeeding when the user presses the button a second time.
In DotNetOpenAuth there is a WebServerClient, a consumer that seems to be able to retrieve an OAuth token based on a consumer Key and Secret, using a 2-legged OAuth step.
The question: Is it possible to await
the result of this token retrieval?
We're looking for some code samples that explain this concept, because we cannot seem to find sample usages of the WebServerClient