1

我的计划是使用 Xing 作为社交登录。我的问题是我找不到 OWIN 自定义身份验证的上帝样本。

对于 Google+,它很简单

//IAppBuilder app
    app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
            {
              ClientId = "xyz",
              ClientSecret = "abc"
            });

我已经创建了一个 Xing App 并从这个 App 中获取了 ID 和 Secret。但是我如何使用这个 id 和 Secret 创建一个自定义身份验证?我该如何使用它?

4

1 回答 1

0

你可以像这样使用它:

var xingOptions = new XingAuthenticationOptions()
{
    ConsumerKey = ConfigurationManager.AppSettings["xingConsumerKey"],
    ConsumerSecret = ConfigurationManager.AppSettings["xingConsumerSecret"]
};

app.UseXingAuthentication(xingOptions);
于 2016-11-15T11:57:48.663 回答