简体   繁体   English

Win8 Metro风格的应用程序中的OpenID(使用Steam进行身份验证)

[英]OpenID in a Win8 Metro-style app (Authenticating with Steam)

I've been thinking of making a Windows 8 Metro (WinRT) style application that would allow the user to login/authenticate with the Steam WebAPI so I could use their stats etc that they provide. 我一直在考虑制作一个Windows 8 Metro(WinRT)风格的应用程序,允许用户使用Steam WebAPI登录/验证,这样我就可以使用他们提供的统计数据等。 However I'm not sure how to approach this. 但是我不知道如何处理这个问题。

Almost every answer to authenticating against an OpenID provider says to use DotNetOpenAuth but when installing this with NuGet it fails saying that a dependency (CodeContracts.Unofficial 1.002) doesn't have any assemblies compatible with my project's target (.NET framework 4.5) so I'm guessing that either hasn't been updated yet for Windows 8 apps or won't be due to some WinRT restriction. 几乎每个针对OpenID提供程序进行身份验证的答案都说使用DotNetOpenAuth但是在使用NuGet进行安装时,它无法说依赖项(CodeContracts.Unofficial 1.002)没有任何与我的项目目标(.NET framework 4.5)兼容的程序集,所以我我猜测还没有为Windows 8应用程序更新,或者不会因为一些WinRT限制。

I've also looked in to using the .NET library's WebAuthenticationBroker class, but I'm not sure how to use this with an OpenID provider. 我也研究过使用.NET库的WebAuthenticationBroker类,但我不确定如何在OpenID提供程序中使用它。 The samples for it seem to only be for OAuth, and on the Steam WebAPI Page the only information provided is: 它的示例似乎只适用于OAuth,而在Steam WebAPI页面上 ,提供的唯一信息是:

Just download an OpenID library for your language and platform of choice and use http://steamcommunity.com/openid as the provider. 只需为您选择的语言和平台下载OpenID库,并使用http://steamcommunity.com/openid作为提供商。 The returned Claimed ID will contain the user's 64-bit SteamID. 返回的声明ID将包含用户的64位SteamID。

I tried simply using the given URL by passing it straight to AuthenticateAsync(WebAuthenticationOptions, Uri); 我尝试使用给定的URL直接传递给AuthenticateAsync(WebAuthenticationOptions, Uri); but this just gives a white screen with a spinner on it. 但这只是一个带有微调器的白色屏幕。

Does anyone have any advice for me on how to either get an OpenID library working with a metro application, or how to use the WebAuthenticationBroker to auth via the OpenID protocol (preferably against steam specifically)? 有没有人对我如何获得一个使用metro应用程序的OpenID库,或者如何使用WebAuthenticationBroker通过OpenID协议进行身份验证(最好是特别针对Steam)?

http://steamcommunity.com/dev This say you have to use OpenID but it seem the C# lib for openID do not work with .Net 4.5. http://steamcommunity.com/dev这说你必须使用OpenID,但似乎openID的C#lib不能与.Net 4.5一起使用。

You might could make an C++ dll window store app project and use the OpenID C++ to do the job. 您可以创建一个C ++ DLL窗口存储应用程序项目并使用OpenID C ++来完成这项工作。 Than add that dll to your C# window store app. 然后将该dll添加到您的C#窗口商店应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM