Steam OpenId in MVC application

拟墨画扇 提交于 2019-12-18 12:49:26

问题


I have never done an openid application before. I did see that MVC 5 has some built in oauth sign ins. I was able to get these to work no problem, as they are already built.

But I am completely unsure how to get the steam openid to work in MVC. Does anyone have some sample code of there MVC Steam OpendID stuff? Or does anyone know a good tutorial for this?


回答1:


Go to Tools > Library Package Manager > Package Manager Console and type:

Install-Package Owin.Security.Providers

Open your App_Start\Startup.Auth.cs, and add:

using Owin.Security.Providers.Steam;

Then, in the ConfigureAuth method, add:

app.UseSteamAuthentication("your API key");

You can get an API key from http://steamcommunity.com/dev.

A "Steam" button should be added to your login page.




回答2:


Here is an excellent tutorial on how to integrate openid with ASP.NET MVC, and it do have working code, and instructions. Please have a look and get going.

http://weblogs.asp.net/haithamkhedre/archive/2011/03/13/openid-authentication-with-asp-net-mvc3-dotnetopenauth-and-openid-selector.aspx

Hope this helps.



来源:https://stackoverflow.com/questions/21079060/steam-openid-in-mvc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!