Web身份验证代理只返回回调URL?

时间:2014-02-10 03:23:00

标签: c# windows-8 oauth

在我的应用程序中,我有WebAuthenticationBroker工作,但由于某种原因,ResponseData只返回Callback Url而不是令牌,验证器等。该数据是否应该是WAB返回的Url的一部分?如果是这样的话意味着提供者API存在问题吗?

这是我的代码

public async Task<string> Authorize(string oAuthAuthorizeUrl)
{
    System.Uri StartUri = new Uri(oAuthAuthorizeUrl);
    System.Uri EndUri = new Uri("https://api.xyz.com/oauth/authorize-submit");
    //System.Uri EndUri = new Uri(WebAuthenticationBroker.GetCurrentApplicationCallbackUri().ToString());

    var auth =
        await
        WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, StartUri, EndUri);

    var responseText = auth.ResponseData; // Callback url specified above gets returned here
    ...
}

API使用OAuth 1.0a。谢谢你的帮助。

0 个答案:

没有答案
相关问题