Anniversary Sale · up to 80% off all librariesEnds Nov 9Shop now
SOFTTDocs
Security

Authentication

Restrict access to an ESP-DASH dashboard with HTTP Basic Authentication using a username and password.

ESP-DASH supports HTTP Basic Authentication. Enable it to control who can view your dashboard.

Browser authentication prompt

Enable authentication

Call setAuthentication() on the dashboard instance with a username and password:

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

Prop

Type

When authentication is enabled, ESP-DASH requires the credentials both for the dashboard page and for the WebSocket connection that carries dashboard updates.

Notes

  • Authentication is enabled only when both the username and the password are non-empty.
  • setAuthentication() also accepts dash::string arguments.

On this page