Securing a WCF RESTful service— can't call it unless authenticated

我只是一个虾纸丫 提交于 2019-12-22 22:58:00

问题


I'm going to write a RESTful WCF service with webHttp or basicHTTP bindings-- nothing fancy.

However, I would like to secure it so that unless someone has logged into / authenticated against my ASP.Net MVC website they can't use the service. I must be looking in the wrong places because every discussion or article I read about this deals with securing the service calls via certificates or SSL.

That's good to know, but I'm more interested in how to prevent someone from using the service, giving them an error message, unless they're logged in? I'm using forms authentication FWIW but would be interested in learning how to go about this using OAuth as well. Thanks for your tips and advice.


回答1:


I would say that this is a duplicate question to this one: How do I set oAuth authentication for a WCF REST C# Site . However, the information there is quite limited as well. You can also look at this article: http://weblogs.asp.net/cibrax/archive/2008/11/14/oauth-channel-for-wcf-restful-services.aspx .



来源:https://stackoverflow.com/questions/10401747/securing-a-wcf-restful-service-cant-call-it-unless-authenticated

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