[英]Is it possible to expose an API for my own WebSite … but use oAuth for the api authentication?
currently I expose an Api for my website. 目前,我为我的网站公开了一个Api。 Works great .. and i use Basic Authentication to authenticate users to get access to the data.
效果很好..我使用基本身份验证来验证用户身份以访问数据。
eg. 例如。
http://www.MyWebSite.com <-- main site.
http://api.MyWebSite.com <-- my api website.
sample api RESTful url api RESTful URL示例
http://user1:pass1@api.MyWebSite.com/games?type=battlefield2
(yes yes i know browsers stop people from putting in user1:pass1 (Basic Auth) into the url directly .. cause of security . but it's to highlight that we're using Basic Auth)). (是的,我知道浏览器会阻止人们直接将user1:pass1(基本身份验证)放入url中。.安全原因。但要强调的是,我们正在使用基本身份验证))。
So .. how can i do this with oAuth? 所以..我怎样才能用oAuth做到这一点?
You might consider looking at these resources to get rolling with OAuth in an ASP.NET application or with WCF services: 您可以考虑查看以下资源,以在ASP.NET应用程序或WCF服务中使用OAuth进行滚动:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.