Custom UserNamePasswordValidator with Silverlight 3.0

杀马特。学长 韩版系。学妹 提交于 2020-01-05 13:09:25

问题


I have implemented a WCF service that uses a TransportWithMessageCredential binding and a custom UserNamePasswordValidator.

I have a Silverlight 3 client connecting to this service. If I set valid credentials it works perfect, however, in the username validator I throw a SecurityTokenException if the username and password does not match.

Now I have implemented a dummy service call just to verify the credentials, is there a "nicer" way of checking the credentials. A service method that accept username and password and returns true/false doesn't feel safe.


回答1:


I think you're going about security in the wrong way. there are builtin methods for dealing with this. Look up "Membership Providers". Ex:

http://blogs.msdn.com/brada/archive/2008/05/03/accessing-the-asp-net-authentication-profile-and-role-service-in-silverlight.aspx



来源:https://stackoverflow.com/questions/2077854/custom-usernamepasswordvalidator-with-silverlight-3-0

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