MCPcopy Create free account
hub / github.com/ayushsharma82/WebSerial / setAuthentication

Method setAuthentication

src/WebSerial.cpp:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39static const size_t WSL_MSG_SIZE_LEN = sizeof(uint16_t);
40
41void WebSerialClass::setAuthentication(const String& username, const String& password){
42 _username = username;
43 _password = password;
44 _authenticate = !_username.isEmpty() && !_password.isEmpty();
45 if (_ws != nullptr) {
46 _ws->setAuthentication(_username.c_str(), _password.c_str());
47 }
48}
49
50void WebSerialClass::begin(AsyncWebServer *server, const char* url) {
51 _server = server;

Callers 1

beginMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected