WCF 和 AIR/Flex 4 安全性
在当前的项目中,我们在 IIS7 上托管 WCF 3.5 服务,并通过 basicHttpBinding 将方法公开给 Adobe AIR/Flex4 客户端。幸运的是,Flash Builder 4 集成了对 SOAP 的支持,因此可以轻松生成服务代理。
不幸的是,我们无法找到任何优雅的解决方案来启用用户名身份验证。我们工作的唯一方法是在每个方法调用上传递用户名和密码,这肯定会破坏方法签名并强制服务方法实现自行进行验证。
您能否指导我找到任何可以将消息标头中的用户名身份验证引入 adobe flex 的解决方案?
此致, 丹尼尔·朗
In a current project we are hosting a WCF 3.5 service on IIS7 and expose the methods through basicHttpBinding to an Adobe AIR/Flex4-client. Luckily Flash Builder 4 has integrated support for SOAP, so that a service-proxy can be generated easily.
Unfortunately, we are not able to find any elegant solution to enable username authentication. The only way we got working, is to pass username und password on every single method-call, which certainly blows up the method-signatures and enforces the service-method-implementation to do a validation by their own.
Could you please direct me to any solution, which could bring username authentication within the message-headers to adobe flex?
Best regards,
Daniel Lang
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将如何在非 Flex 应用程序中传递身份验证凭据?
大多数人只是设置某种 cookie。许多服务器端应用程序服务器在内部执行此操作。
从 Flash Player 到您的后端的任何调用都将发送所有已发送的 cookie;它可以轻松地用于连接到您的服务器端会话。我认为大多数服务器端应用程序服务器在内部处理这些东西。
如果需要为 HTML 调用设置特定标头,可以使用 HTTPService 的 headers 属性。这是关于如何 的一个很好的示例设置标题。
How would you pass the authentication credentials in a non Flex app?
Most people just set a cookie of some sorts. Many server side app servers do this stuff internally.
Any calls from the Flash Player to your backend will send along any cookies that were already sent; which can easily be used to connect to your server side session. I thought most server side app servers handle this stuff internally.
If you need to set specific headers to HTML calls, you can specify them using the headers property of HTTPService. Here is a good example about how to set the header.