Пример #1
0
void Authenticator::authenticate(http::Request& request,
                                 const http::Response& response)
{
    for (http::Response::ConstIterator iter = response.find("WWW-Authenticate");
         iter != response.end(); ++iter) {
        if (isBasicCredentials(iter->second)) {
            BasicAuthenticator(_username, _password).authenticate(request);
            return;
        }
        // else if (isDigestCredentials(iter->second))
        //    ; // TODO
    }
}