Skip to content

HTTP Basic Authentication

Eliza Margaretha edited this page Mar 31, 2023 · 1 revision

HTTP Basic Authentication is an authentication protocol defining how to encode username and password within HTTP Authorization header. HTTP Authorization header consists of two parts: authorization scheme and authorization parameters.

Authorization: [authorization scheme] [authorization parameters]

For HTTP Basic Authentication, the scheme value is basic. The authorization parameters should include user credentials in the following format username:password encoded in Base64.

Authorization: Basic [Base64(username:password)]

Example

Credentials Value
username korap-user
password user-password
Base64(username:password) a29yYXAtdXNlcjp1c2VyLXBhc3N3b3Jk

The authorization header for the credentials described above:

Authorization: Basic a29yYXAtdXNlcjp1c2VyLXBhc3N3b3Jk
Clone this wiki locally