Anniversary Sale · up to 80% off all librariesEnds Nov 9Shop now
SOFTTDocs
Security
You are reading the documentation for ESP-DASH v4.x.x, which is no longer the latest release. View the v5.x.x documentation.

Authentication

Protect an ESP-DASH v4 dashboard with HTTP Basic Authentication using setAuthentication().

ESP-DASH supports HTTP Basic Authentication. When enabled, the browser prompts for a username and password before the dashboard loads.

Browser authentication prompt

Enable authentication

Call setAuthentication() on the dashboard instance, typically in setup():

dashboard.setAuthentication("username", "password");

setAuthentication() accepts the credentials either as const char* or as String:

void setAuthentication(const char* user, const char* pass);
void setAuthentication(const String &user, const String &pass);

Prop

Type

HTTP Basic Authentication transmits credentials encoded, not encrypted. Over plain HTTP, anyone on the same network can read them. Use it as an access control on trusted networks.

On this page