简体   繁体   中英

DotNetOpenAuth and Quickbooks

I'm need to develop a .NET 3.5 application that imports data from Quickbooks, and I decided to use DNOA to OAuthorize with them. I downloaded the latest available version (4.1.something), took a look around, then create a QuickBooksConsumer following the example of GoogleConsumer. However, there is a problem I cannot seem to solve.

The url of the QuickBooks REST services looks like this:

https://services.intuit.com/sb/{0}/v2/{1}

where:

{0} is the name of the object to get the records of (like, "invoice", or "payment");

{1} is the realmId , ie the id of the Company the data is required for

The problem is that I don't see how to do PrepareAuthorizedRequest with such variable urls. The function is not virtual, so I cannot override it in my QuickBooksConsumer.cs . I'm stuck. Can you please show me the way how to do that?

Thanks in advance!

Authorizing requests to dynamically created URLs should be no problem at all. Just wrap any URL in a MessageReceivingEndpoint and send it through ConsumerBase.PrepareAuthorizedRequest and you're good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM