DotNetOpenAuth 意外响应内容类型文本/javascript
一些 OAuth 提供商行为不佳,mail.ru 就是一个例子。
他们返回的内容类型是文本/javascript,其开发人员的动机是简化他们的调试例程。
- 我们可以“改进”DotNetOpenAuth CTP 的源代码 - 但据我所知,它尚未公开。
- 是否有一种“行为良好”的方法来覆盖当前 DNOA 实现中的内容类型解释?
谢谢你!
Some OAuth providers are not well-behaved, one example being mail.ru.
Their returned content type is text/javascript, motivated by their developers as simplifying their debugging routines.
- We could "improve" the source code of DotNetOpenAuth CTP - but from what I see it is not yet publicly available
- Is there a "well-behaved" way to override the content type interpretation in the current DNOA implementation?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改 DNOA 看到的内容类型的唯一方法是插入您自己的
IDirectWebRequestHandler
,尽管允许这样做,但这并不是一项简单的任务,并且欺骗 DNOA 通常会导致安全问题。CTP 的源代码可以在此处获取,事实上该分支的尖端有这一变化使其在这方面更加宽松。
The only way you could change the content-type that DNOA sees would be to plug in your own
IDirectWebRequestHandler
, which while allowed, isn't a trivial task and fooling DNOA can often lead to security problems.The source code to the CTP is available here, and in fact the tip of that branch has the change that makes it more lenient in this regard.