views:

209

answers:

1

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.

A: 

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.

Snukker