|
Electroneum
|
Implements RFC 2617 digest auth. Digests from RFC 7616 can be added. More...
#include <http_auth.h>
Classes | |
| struct | session |
Public Types | |
| enum | status : std::uint8_t { kSuccess = 0, kBadPassword, kParseFailure } |
Public Member Functions | |
| http_client_auth () | |
| http_client_auth (login credentials) | |
| status | handle_401 (const http_response_info &response) |
| boost::optional< std::pair< std::string, std::string > > | get_auth_field (const boost::string_ref method, const boost::string_ref uri) |
Implements RFC 2617 digest auth. Digests from RFC 7616 can be added.
Definition at line 95 of file http_auth.h.
|
inline |
Definition at line 130 of file http_auth.h.
| epee::net_utils::http::http_client_auth::http_client_auth | ( | login | credentials | ) |
|
inline |
After calling handle_401, clients should call this function to generate an authentication field for every request.
handle_401(...) previously returned kSuccess. Definition at line 158 of file http_auth.h.

|
inline |
Clients receiving a 401 response code from the server should call this function to process the server auth. Then, before every client request, get_auth_field() should be called to retrieve the newest authorization request.
kBadPassword if client will never be able to authenticate, kParseFailure if all server authentication responses were invalid, and kSuccess if get_auth_field is ready to generate authorization fields. Definition at line 144 of file http_auth.h.
