浏览器工具来计算和设置授权标头?

发布于 2024-08-17 01:51:10 字数 196 浏览 1 评论 0原文

是否有任何 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沩ん囻菔务 2024-08-24 01:51:10

我不知道专门用于授权标头的插件,但我可以推荐“篡改数据”插件。它允许您在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文