cooltalk2swaroop / poster-extension

Automatically exported from code.google.com/p/poster-extension
0 stars 0 forks source link

HTTP HEADER AUTHORIZATION #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How should I pass authorization header in POST request ?

Should I base64 encode Authorization header or POSTER does it before
creating HTTP envelope ?

I tried header as follows :

name : Authorization: and

Value: <base64 encoded value >

Is this correct way to send ? Any example would be helpful
Thanks

Original issue reported on code.google.com by rajanjas...@gmail.com on 10 Mar 2010 at 11:08

GoogleCodeExporter commented 9 years ago
In general, yes.  The value of the Authorization header is whatever your server 
expects.  It is different with 
different authorization schemes.

This doesn't seem like a bug. 

Original comment by alexmilo...@gmail.com on 11 Mar 2010 at 3:35

GoogleCodeExporter commented 9 years ago
Sorry, I could not make my question clearer. This is not a bug.

Do I need to base64 encode Authorization header value or Poster plug-in will do 
it
while forming response ? I thought Poster plug-in should do it as BASIC 
Authorization
header is base64 encoded and user need not worry about converting to BASE64.

Original comment by rajanjas...@gmail.com on 11 Mar 2010 at 5:52

GoogleCodeExporter commented 9 years ago
Poster will handle basic authentication automatically if you enter the username 
and password into the fields 
provided.  You do not need to add your own authorization header.

Unfortunately, Firefox requires a authorization challenge request to formulate 
and send the request. If you need 
to send the Authorization header on the first try, you'll need to formulate 
that header yourself.  In the case of 
BASIC authentication, yes, you would need to base64 encode the value before you 
entered it.

Original comment by alexmilo...@gmail.com on 11 Mar 2010 at 6:02