开发者

DotNetOpenAuth: when is StoreNewRequestToken called?

开发者 https://www.devze.com 2023-04-11 15:32 出处:网络
I\'m trying to implement DotNetOpenAuth, without using an OpenId-provider. Getting a RequestToken does not work on my implementation.

I'm trying to implement DotNetOpenAuth, without using an OpenId-provider. Getting a RequestToken does not work on my implementation.

I'm calling a method, which calls the ServiceProvider.ReadRe开发者_Python百科quest(). This is calling the IServiceProviderTokenManager.GetRequestToken(string token). At this point, no RequestToken is found, because I was expecting this method to create a RequestToken.

But creating a RequestToken is handled by the method StoreNewRequestToken. When does this method get called? Or how can I make this method being called?


It sounds like your OAuth SP host code is either miswritten or the Consumer is possibly providing a token from an earlier attempt. Please activate logging and add logs to your question.

I believe DotNetOpenAuth calls your StoreNewRequestToken method when you are actually transmitting your response to the Consumer using ServiceProvider.PrepareUnauthorizedTokenMessage and sending its result using ServiceProvider.Channel.Send. Before that, I don't think DNOA should be calling your GetRequestToken yet because the Consumer shouldn't have any token to try with -- thus my earlier suggestion that the consumer is possibly using an old token (or malfunctioning).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号