HTTP basic authentication

Hi all...

I have this project on an embbeded system where I've programmed a very simple dynamic web-server on C, which serves 1 connection at a time. I need to implement a basic authentication system. I've heard the easiest is to go for HTTP 1.1 authentication, but I don't know ho to implement it.... Can anybody give me some advice, guidelines on where to start?

Thank's ...... oh, and happy new year!!

Yodai

Reply to
Yodai
Loading thread data ...

The client passes in a header field in the GET method which is formatted as follows:

Authorization: Basic BASE64ENCODEDSTRINGHERE\r\n

where BASE64ENCODEDSTRINGHERE is actually login:password which got base64 encoded. All you do then in your server is to examine the header fields passed in for this Authorization header field, examine the field content, base64 decode it and look up if you have such a user with such a password.

HTH

Markus

Reply to
Markus Zingg

Yodai wrote: : : I have this project on an embbeded system where I've programmed a very : simple dynamic web-server on C, which serves 1 connection at a time. I need : to implement a basic authentication system. I've heard the easiest is to go : for : HTTP 1.1 authentication, but I don't know ho to implement it.... Can anybody : give me some advice, guidelines on where to start? :

A google search will yield quite a lot of information. I'd recommend looking there first....

--buddy

--
Remove '.spaminator' and '.invalid' from email address
when replying.
Reply to
buddy.spaminator.smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.