HTTPS 和摘要式认证
如何在 C#.Net 中使用摘要式身份验证实现 HTTPS?根据msdn,凭证类不支持SSL..那么我们如何实现身份验证呢?我的代码适用于基本身份验证,但在摘要方面给出错误..
How to implement HTTPS with Digest Authentication in C#.Net? as per msdn, credential class has no support for SSL.. so how can we implement authentication? my code works with basic authentication but gives error with digest..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在 CredentialCache 中创建凭据时指定凭据类型,用于 WebClient 和 WebRequest。因此,例如,要填充 CredentialCache 以尝试摘要式身份验证,您可以使用
摘要式身份验证取决于目标 URL 和领域(如果它指定了您确实需要正确设置的领域)。
You can specify the type of credential when creating a credential in the CredentialCache, which is used for WebClients and WebRequests. So, for example, to populate the CredentialCache to try Digest auth you could use
As digest authentication is dependant on the destination URL, and the realm if it specifies one you do need to get those right.
您正在尝试将通常被认为是相互替代的事物结合起来。
HTTP 摘要式身份验证使用 MD5 加密用户凭据,如今 MD5 被认为不够安全。
因此,这里的信息是:使用带有基本身份验证的 HTTPS。
You are trying to combine things that are usually considered to be alternatives to each other.
HTTP Digest Authentication encrypts user credentials using MD5, which is not considered to be secure enough nowadays.
So, the message here is: use HTTPS with basic authentication.