Skip to content

To implement your own authentication

Uplusware edited this page Sep 25, 2017 · 6 revisions

Implement your own authentication in src/heapauth.cpp

For example:

bool heaphttpd_usrdef_get_password(CHttp* psession, const char* username, string& password)
{
    if(strcasecmp(username, "admin") == 0)
    {
        password = "Passw0rd";
        return true;
    }
    else
    {
        return false;
    }
}