Protocols
Saved & recent

HTTP authentication

Also called: HTTP auth, authentication challenge

HTTP authentication provides a framework for presenting credentials and challenging a request. An origin server can return 401 with WWW-Authenticate; the client can send credentials in Authorization. The named scheme determines how those credentials work. Supplying credentials does not automatically grant permission to every resource.

For example, a document service challenges a request with WWW-Authenticate: Bearer, and a client retries with its access token. Basic authentication instead encodes a username and password using Base64, which provides no secrecy. HTTPS protects transport; the authentication scheme and the service’s permission checks still have separate jobs.

Read first
HTTP
Related
Authentication, Bearer token, HTTPS
Further reading
client document service request without credential 401 Unauthorized WWW-Authenticate: Bearer Authorization: Bearer <token> credential valid? permission granted? access requires both checks
An HTTP 401 challenge names a scheme. The client supplies a token in a later request; access still depends on credential validation and permission checks.

View in the full Protocols collection