WWW-Authenticate

Sent with a 401 response to say which authentication scheme to use.

Explained

Examples

Example

WWW-Authenticate: Bearer realm="api", error="invalid_token"

Watch out

A 401 without it is technically incomplete. With a Basic scheme, browsers show their own login box.

Defined in RFC 9110 §11.6.1.

Other common headers