HTTP Digest Authenticator class.
More...
#include <sensesp/net/http_authenticator.h>
HTTP Digest Authenticator class.
Definition at line 45 of file http_authenticator.h.
◆ HTTPDigestAuthenticator()
sensesp::HTTPDigestAuthenticator::HTTPDigestAuthenticator |
( |
String | username, |
|
|
String | password, |
|
|
String | realm, |
|
|
unsigned long | nonce_max_age = 900000 ) |
|
inline |
◆ authenticate_digest()
int sensesp::HTTPDigestAuthenticator::authenticate_digest |
( |
httpd_req_t * | req | ) |
|
◆ authenticate_request()
bool sensesp::HTTPDigestAuthenticator::authenticate_request |
( |
httpd_req_t * | req | ) |
|
|
overridevirtual |
Authenticate an incoming request.
This method should be called at the beginning of each request handler to ensure that the request is authenticated.
- Parameters
-
- Returns
- true Authentication successful.
-
false Authentication failed.
Implements sensesp::HTTPAuthenticator.
Definition at line 14 of file http_authenticator.cpp.
◆ create_nonce()
String sensesp::HTTPDigestAuthenticator::create_nonce |
( |
| ) |
|
|
protected |
◆ extract_param()
String sensesp::HTTPDigestAuthenticator::extract_param |
( |
String | param, |
|
|
String | auth_str, |
|
|
bool | quoted = true ) |
|
protected |
◆ find_nonce()
int sensesp::HTTPDigestAuthenticator::find_nonce |
( |
String | nonce, |
|
|
int | count ) |
|
protected |
Find a nonce in the list of nonces.
- Parameters
-
nonce | Nonce to find |
count | Count of the nonce |
max_age | Maximum age of the nonce in milliseconds |
- Returns
- 1 Nonce found
-
0 Nonce not found
-
-1 Nonce found but stale
Definition at line 166 of file http_authenticator.cpp.
◆ request_authentication()
esp_err_t sensesp::HTTPDigestAuthenticator::request_authentication |
( |
httpd_req_t * | req, |
|
|
bool | stale = false ) |
|
protected |
◆ nonce_max_age_
unsigned long sensesp::HTTPDigestAuthenticator::nonce_max_age_ |
|
protected |
◆ nonces_
std::list<NonceData> sensesp::HTTPDigestAuthenticator::nonces_ |
|
protected |
◆ password_
String sensesp::HTTPDigestAuthenticator::password_ |
|
protected |
◆ realm_
String sensesp::HTTPDigestAuthenticator::realm_ |
|
protected |
◆ secret_
String sensesp::HTTPDigestAuthenticator::secret_ |
|
protected |
Secret used to generate the nonce. Gets reset every restart.
Definition at line 68 of file http_authenticator.h.
◆ username_
String sensesp::HTTPDigestAuthenticator::username_ |
|
protected |
The documentation for this class was generated from the following files: