facebook - At what point is 'TokenManager.StoreNewRequestToken' called in the OAuth 2.0 DNOA version -
the point is, have app (i feel half knows already) read info twitter (oauth 1.0a) , facebook (oauth 2.0 'ish).
in twitter version use old webconsumer class. has preparerequestuserauthentication function calls itokenmanager.storenewrequesttoken function stores tokens.
my question how work in webserverclient, has functions similar, don't seem act in same way.
if (application facebookapplication) { // need webserverclient instead of webconsumer can use oauth 2.0 client = new facebookclient(this) { clientidentifier = application.consumerkey, clientsecret = application.consumersecret, }; iauthorizationstate authorization = client.processuserauthorization(); if (authorization == null) { client.requestuserauthorization(null, null, callback); } } else { // here need webconsumer webconsumer consumer = application.getconsumer(this) webconsumer; userauthorizationrequest authorizationrequest = consumer.preparerequestuserauthorization(callback, requestparameters, redirectparameters); consumer.channel.send(authorizationrequest); } at moment have facebookapplication class , twitterapplication class. both inherit oauthwebapplication contains has function getconsumer(iconsumertokenmanager tm) return webconsumer oauth 1.0 process. reckon need add in oauth 2.0's webserverclient oauth 2.0 process?
never, since oauth 2 client classes in dotnetopenauth don't take token manager.
oauth 1 requires token manager because client must track intermediate state of requesting access , receiving access. in oauth 2 client simpler because there no request token store -- final access token.
Comments
Post a Comment