Skip to content

To implement your own authentication

Uplusware edited this page May 24, 2016 · 6 revisions

Implement your own authentication in src/niuauth.cpp For example:

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

Clone this wiki locally