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.ReadRequest().
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
StoreNewRequestTokenmethod when you are actually transmitting your response to the Consumer usingServiceProvider.PrepareUnauthorizedTokenMessageand sending its result usingServiceProvider.Channel.Send. Before that, I don’t think DNOA should be calling yourGetRequestTokenyet 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).