HTTP basic authentication

Jan 06, 2004 2 Replies

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


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

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.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required