How the header is built
The server expects Authorization: Basic <token>, where the token is base64(username:password). For example, aladdin:opensesame becomes Basic YWxhZGRpbjpvcGVuc2VzYW1l. Base64 is reversible encoding, not encryption — anyone who sees the header can read the password.