C# 在AuthenticateAsync()期间,我们可以在WebAuthenticationBroker类中使用http://方案而不是https://吗

C# 在AuthenticateAsync()期间,我们可以在WebAuthenticationBroker类中使用http://方案而不是https://吗,c#,windows-store-apps,C#,Windows Store Apps,我在Windows应用商店应用程序的身份验证过程中遇到问题。我正在使用WebAuthenticationBroker类进行身份验证。我有一个带有http://schemes的URL,但是WebAuthenticationBroker类不允许在使用authenticateSync()时继续 异常消息是:只允许https://方案 那么,我如何解决这个问题并通过WebAuthenticationBrokerclass使用http://schemes进行身份验证呢 例如: var signInUrl

我在Windows应用商店应用程序的身份验证过程中遇到问题。我正在使用
WebAuthenticationBroker
类进行身份验证。我有一个带有http://schemes的URL,但是
WebAuthenticationBroker
类不允许在使用
authenticateSync()时继续

异常消息是:
只允许https://方案

那么,我如何解决这个问题并通过
WebAuthenticationBroker
class使用http://schemes进行身份验证呢

例如:

var signInUrl = new Uri("http://example.com");

var WebAuthenticationResult = 
      await WebAuthenticationBroker.AuthenticateAsync(  
           WebAuthenticationOptions.None, 
           signInUrl);

您不能使用http进行登录。这是故意的。Http不安全,要登录您需要传递用户名和密码。因此,您必须使用https

从:

应用程序用于与在线提供商通信的第一个URL必须是HTTPS