MCPcopy Create free account
hub / github.com/Heltec-Aaron-Lee/WiFi_Kit_series / authenticate

Method authenticate

libraries/WebServer/src/WebServer.cpp:144–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144bool WebServer::authenticate(const char *_username, const char *_password) {
145 return WebServer::authenticate([_username, _password](HTTPAuthMethod mode, String username, String params[]) -> String * {
146 (void)mode;
147 (void)params;
148 return username.equalsConstantTime(_username) ? new String(_password) : NULL;
149 });
150}
151
152bool WebServer::authenticate(THandlerFunctionAuthCheck fn) {
153 if (!hasHeader(FPSTR(AUTHORIZATION_HEADER))) {

Callers 3

isAllowedMethod · 0.80
runMethod · 0.80
setupMethod · 0.80

Calls 11

authenticateFunction · 0.85
base64_decode_charsFunction · 0.85
md5strFunction · 0.85
StringClass · 0.85
equalsConstantTimeMethod · 0.80
c_strMethod · 0.80
indexOfMethod · 0.80
startsWithMethod · 0.45
substringMethod · 0.45
trimMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected