【问题标题】:Is it possible to expose an API for my own WebSite ... but use oAuth for the api authentication?是否可以为我自己的网站公开 API ...但使用 oAuth 进行 api 身份验证?
【发布时间】:2010-08-17 12:44:21
【问题描述】:

目前我为我的网站公开了一个 Api。效果很好.. 我使用 基本身份验证 对用户进行身份验证以访问数据。

例如。

http://www.MyWebSite.com  <-- main site.
http://api.MyWebSite.com  <-- my api website.

示例 api RESTful url

http://user1:pass1@api.MyWebSite.com/games?type=battlefield2

(是的,我知道浏览器会阻止人们直接将 user1:pass1(基本身份验证)放入 url .. 出于安全考虑。但这是为了强调我们正在使用基本身份验证)。

那么 .. 我如何使用 oAuth 做到这一点?

【问题讨论】:

    标签: .net api authentication oauth basic-authentication


    【解决方案1】:

    您可以考虑查看这些资源,以便在 ASP.NET 应用程序或 WCF 服务中使用 OAuth:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-28
      • 1970-01-01
      • 1970-01-01
      • 2012-11-27
      • 2011-02-28
      • 2022-10-24
      • 2013-11-29
      相关资源
      最近更新 更多