[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Doubt about digest auth algorithm

From: silvioprog
Subject: [libmicrohttpd] Doubt about digest auth algorithm
Date: Thu, 10 Mar 2016 09:51:19 -0300

Hello listers,

First, thanks for the rich auth demos available in the MHD, it was very useful for understand how the popular auths works.

I have a small question about the digest auth: how to check if the user password is correctly? I have an example (in pseudo code) to check if my logic is correct:

/* my digest check logic */
bool isAuthenticated(char user, char * refPass) {
  bool userOK = (user == "my-user");
  // get the my-user password from database
  &refPass = "my-pass"; // got from my database
  return userOK; // in my real code, if this function return true, the next func called will be MHD_digest_auth_check() receiving the refPass content

It seems that I need to get the user password from some place, and send it to the MHD_digest_auth_check().

It is a little bit different from basic auth, that I just need to decode a base64 and the a string like "user:pass". BTW, is my digest check logic correct?

Silvio Clécio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]