3

メトロ アプリから呼び出す必要がある単純な Web API アプリがあります。認証トークンを取得するために WebAuthenticationBroker を使用しています。

var ipUri = new Uri("https://xxx.accesscontrol.windows.net:443/v2/wsfederation?wa=wsignin1.0&wtrealm=http%3a%2f%2fyyy:2858%2f");

var callbackUri = new Uri(http://yyy:2858/);

WebAuthenticationResult webAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(
                                                       WebAuthenticationOptions.None,
                                                       ipUri,callbackUri);

if (webAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success)
{
     tokenBlock.Text = webAuthenticationResult.ResponseData.ToString();
}

問題は、webAuthenticationResult.ResponseData でアプリケーション コールバック URL (つまり ) のみを取得し、トークンを取得しないことです。

何か案は?

ありがとう

マヌー

4

0 に答える 0