We've found the solution in the WebConsumer class after all. The way to obtain a token using a synchronous 2-legged OAuth step
OAuthGlobals.TokenManager = new InMemoryTokenManager(consumerKey, consumerSecret);
WebConsumer consumer = new WebConsumer(OAuthGlobals.ServiceProviderDescription, OAuthGlobals.TokenManager);
OAuthGlobals.AccessToken = consumer.RequestNewClientAccount();
The RequestNewClientAccount()
performs the synchronous step.
Of course, the handler that processes this request needs to be able to process it, so we needed to adapt it for this case.