2015-04-30 427 views
1

我的計劃是使用邢作爲社交登錄。我的問題是我無法找到OWIN自定義身份驗證的神樣本。owin身份驗證與邢

對於Google+上簡單

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

我不得不創建一個興App和得到了這個應用程序的ID和密鑰。但是,我如何使用此ID和Secret創建自定義身份驗證?我該如何使用它?

+0

你需要等待MS支持這個:)。 –

回答

0

您可以使用它像這樣:

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

app.UseXingAuthentication(xingOptions);