W5500 - http server - 401 Unauthorized How?

#1

Hi, i’m using google translate…
Disassembled the example with wiz550web, transferred to the board.
Now the question is how to make standard HTTP authentication (login / password)? I understand the general sense that when connecting for the first time, the server should send something like this:

> Authorization const char [] = {
"HTTP / 1.1 401 Authorization Required \ r \ n"
"Server: MyServer \ r \ n"
"WWW-Authenticate: Basic realm = \" Cloud System \ "\ r \ n"
"Content Type: Text / html \ r \ n"
"Content Length: 169 \ r \ n \ r \ n"
"<HTML> \ r \ n <HEAD> \ r \ n <TITLE> Error </ TITLE> \ r \ n"
"<META HTTP-EQUIV = \" Content-Type \ "CONTENT = \" text / html; charset = ISO-8859-1 \ "> \ r \ n"
"</ HEAD> \ r \ n <BODY> <H1> 401 is not authorized. </ H1> </ BODY> \ r \ n </ HTML>"
};

But how to accept / process the answer, understand the password, etc.?
Is there a less complete example?

#2

I think your question is more HTTP-related than WizNet related.
Have a look at this:

Now, I don’t know much about HTTP, but as I see it, the client will return a request with an Authorization header, which contains the credentials. You can evaluate them and respond with 200 if everything is okay, or 401 or any other status code that fits

#3

You’re correct, Philipp_K. The HTTP specs say, “HTTP access authentication is explained in “HTTP Authentication: Basic and Digest Access Authentication” [43]