Basic Authentication

Overview

Basic authentication sends username and password in each request, encoded with Base64. It must only be used over TLS.

Request Example

Authorization: Basic dXNlcjpwYXNzd29yZA==

Appropriate Use Cases

flowchart LR A[Client] -->|Basic Auth Header| B[API over TLS] B --> C[Credential Validation]

Production Example

Teams often replace Basic Auth with OAuth or mutual TLS over time while maintaining short-term compatibility for legacy clients.

Common Pitfalls

Key Takeaways