DotNetOpenAuth: when is StoreNewRequestToken called?
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).
精彩评论