在MVC应用程序蒸汽的OpenID [英] Steam OpenId in MVC application

查看:420
本文介绍了在MVC应用程序蒸汽的OpenID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从来没有做过一个OpenID应用程序。我也看到,MVC 5有内建的OAuth的迹象插件。我能得到这些工作没有问题,因为它们已经建成。

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.

不过,我完全不清楚如何获得蒸汽的OpenID在MVC工作。有没有人有那里MVC蒸汽OpendID东西,一些样本code?还是没有人知道这一个很好的教程?

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?

推荐答案

转到工具>库软件包管理器>软件包管理器控制台,然后键入:

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

Install-Package Owin.Security.Providers

打开App_Start \\ Startup.Auth.cs,并添加:

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

using Owin.Security.Providers.Steam;

然后,在 ConfigureAuth 方法,添加:

app.UseSteamAuthentication("your API key");

您可以从 http://steamcommunity.com/dev API密钥。

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

有一个蒸汽按钮应该被添加到您的登录页面。

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

这篇关于在MVC应用程序蒸汽的OpenID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆