我想编写一个ASP.NET 5 MVC6网站来与BattleNet API进行交互。
该网站是设置的,我已经创建了一个BattleNet应用程序认证和密钥。现在,我希望针对BattleNet服务进行身份验证,但不知道如何使用OAuth2 5对OAuth2安全性进行身份验证。
我的研究表明,ASP.NET 5没有复制部分安全性。BattleNet建议为OAuth2使用一个完善的库。
如何使用C# ASP.NET 5对BattleNet服务进行身份验证?
注:请提供答案,但不确认情况。
发布于 2015-11-22 23:54:55
有一个ASP.NET 5中间件用于Battle.NET:https://www.nuget.org/packages/AspNet.Security.OAuth.BattleNet/
您可以在这里找到更多关于该项目和其他提供者的信息:https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/
配置它应该相对容易:
app.UseBattleNetAuthentication(options => {
options.ClientId = "client_id";
options.ClientSecret = "client_secret";
// America is the default region, but you can change it.
options.Region = BattleNetAuthenticationRegion.Europe;
});https://stackoverflow.com/questions/33855326
复制相似问题