简体   繁体   English

具有多个用户的WCF REST服务基本身份验证

[英]WCF REST service basic authentication with multiple users

I have a WCF REST service with basic authentication. 我有一个具有基本身份验证的WCF REST服务。 I need a setup where different clients will send credentials assigned to them, while making requests. 我需要一个设置,在发出请求时,不同的客户端将发送分配给它们的凭据。 So I need to allow authentication for multiple users. 因此,我需要允许多个用户进行身份验证。 To avoid custom authentication for each user, I was thing about adding as many users I need in the system; 为了避免对每个用户进行自定义身份验证,我想在系统中添加所需数量的用户。 so for all those users, authentication will be done automatically. 因此对于所有这些用户,身份验证将自动完成。

From what I read, there is no limit of adding max number of users in the system. 据我了解,在系统中添加最大用户数没有限制。 But is it possible that large number of concurrent requests (each having different user credentials) will work? 但是,大量并发请求(每个请求具有不同的用户凭据)是否可能起作用? or is there a limit in such case. 或在这种情况下有限制。

Also is there a better approach? 还有更好的办法吗?

You should be able to achieve the configuration you described, but you should be aware that there seems to be an internal issue with WCF Rest and Basic Authentication, which is described in the following link: 您应该能够实现您描述的配置,但是您应该意识到WCF Rest和基本身份验证似乎存在内部问题,在以下链接中对此进行了描述:
https://connect.microsoft.com/VisualStudio/feedback/details/531787/self-hosted-wcf-rest-with-http-basic-authentication https://connect.microsoft.com/VisualStudio/feedback/details/531787/self-hosted-wcf-rest-with-http-basic-authentication

As a result, you may want to follow the guidance of an established solution, such as documented in the following blog post: http://allen-conway-dotnet.blogspot.com/2012/06/restful-services-authenticating-clients.html 因此,您可能希望遵循已建立的解决方案的指导,例如以下博客文章中所述: http : //allen-conway-dotnet.blogspot.com/2012/06/restful-services-authenticating-clients html的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM