浏览器工具来计算和设置授权标头?
是否有任何 Firefox 附加组件/扩展可以在给定用户名/密码数据集的情况下为授权 HTTP 标头创建正确的必要值?
我有一些代码正在计算授权标头的值,但服务器拒绝它。我希望将我创建的值与浏览器发出的值进行比较,因此允许我在请求数据发送到服务器时观察它。
我没有可以使用的登录字段——我只想从浏览器的 URL 栏发送一个简单的 HTTP 请求。
Are there any Firefox add-ons/extensions that would create the correct necessary values for Authorization HTTP Header, given a username/password dataset?
I have some code that's calculating the value for the Authorization header but the server is rejecting it. I'm looking to compare value that I've created against what a browser would issue, hence allowing me to watch the request data as it goes out to the server.
I don't have a login field to work with -- I just want to send a plain HTTP request from the URL bar of the browser.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道专门用于授权标头的插件,但我可以推荐“篡改数据”插件。它允许您在 http 标头发送到服务器之前查看和修改它们。
对于基本授权,您需要包含标头
Authorization: Basic xxxxx
,其中 xxxxx 替换为 Base64 编码的“用户名:密码”。如果这就是您正在做的事情,但仍然遇到问题,我预计问题出在 Base 64 编码上。该值应以 = 符号结尾,并且可能需要用 0 填充以使其成为正确的长度。
I don't know a plug-in specifically for authorization headers, but I can recommend the "tamper data" plug-in. It lets you see and modify http headers before they get sent to the server.
For basic authorization, you need to include a header
Authorization: Basic xxxxx
where xxxxx is replaced by "username:password" base64 encoded. If this is what you're doing, but you're still having problems, I'd expect the problem to be with the base 64 encoding. The value should end in an = sign and could need padding with a 0 to make it be the correct length.