ethernet shield to send http command

notsolowki:
okay this might work but just to clarify do you mean the response to the server from the browser. as in capture the response back to the server after the 401. or do you mean the nonce from the 401

no, from a web browser after successful authentication

things are never as easy as they seem right. what i thought was going to be a simple http GET command ended up being way more complex that i expected. if anyone has any code that can give me an example of the client side digest authentication that dont use the esp8266http library please share it.

also the nonce changes on every 401 request heres 3 different 401 requests,

connecting...
connected
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="Login to 4E01DD5PAFC1A58", qop="auth", nonce="94869379", opaque="540ecdf4f3a4209074f652938bcaf0853fb4424f"
Connection: close
CONTENT-LENGTH: 0

connecting...
connection failed
connecting...
connected
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="Login to 4E01DD5PAFC1A58", qop="auth", nonce="1151758044", opaque="540ecdf4f3a4209074f652938bcaf0853fb4424f"
Connection: close
CONTENT-LENGTH: 0

connecting...
connected
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="Login to 4E01DD5PAFC1A58", qop="auth", nonce="1254113068", opaque="540ecdf4f3a4209074f652938bcaf0853fb4424f"
Connection: close
CONTENT-LENGTH: 0

Juraj:
it is the server side

True, but the routine shows how to handle nonce and encrypt it. It's a good starting point to build the client side

it changes

notsolowki:
also the nonce changes on every 401 request heres 3 different 401 requests,

it changes because the request doesn't use it

okay so basically i need to contact the server and get that 401 response, then the arduino program needs to collect the nonce and the opaque from the 401 reply then the arduino builds the proper header with the nonce and the opaque and the hashing sequence mentioned from the wiki?

The MD5 hash of the combined username, authentication realm and password is calculated. The result is referred to as HA1.
The MD5 hash of the combined method and digest URI is calculated, e.g. of "GET" and "/dir/index.html". The result is referred to as HA2.
The MD5 hash of the combined HA1 result, server nonce (nonce), request counter (nc), client nonce (cnonce), quality of protection code (qop) and HA2 result is calculated. The result is the "response" value provided by the client.