WWW-Authenticate
The response header sent with 401 Unauthorized that tells the client which authentication scheme to use, such as Basic or Bearer.
In more detail
Its value names the scheme, such as Basic realm="example" or Bearer, and may add parameters such as an error code for an invalid token. Clients use it to know how to authenticate before retrying.
Related terms
- 401 Unauthorized — The HTTP status meaning the request has no valid credentials, so the caller must authenticate first.
- Authorization header — The request header that carries a client’s credentials, such as Authorization: Bearer <token> or Authorization: Basic <encoded>.
Taught in
- Basic Auth, Tokens And Sessions — Modern API Architecture: REST, GraphQL & gRPC