Hi,
I'm trying to implement a Basic Authentication to my web server, using an Arduino Uno with a Ethernet Shield.
But my knowledge of programing is really basic, so I'm having troubles trying to handle a HTTP Header.
What I need to do is save this "Authorization: Basic YWRtaW46YWRtaW4=" (from the example header above) to a char or a string to compare, and see if the user is authorized (and send a 200 OK response) or no (and send a 401 Authorization Required Response).
GET / HTTP/1.1
Authorization: Basic YWRtaW46YWRtaW4=
I already burned my brains trying to do it, using a char array and / or strings, but I couldn't figure it out.
I was trying to use the HTTP_request, but it's buffer is to small to handle all the HTTP header (I already try to increase it, but if pass from 100 the Arduino frezzes, something with the 2k memory I think). So I need to create another char array to store the Authorization, but I can't figure how to do to it start saving only the caracters I need and stop when it ended.
Thanks in advance, any help or suggestion are really welcome.