The text before the colon is the username.
The colon splits the credential
The text before the colon becomes the username row.
before colon=alice
The username is alice
The username row is recomputed from the decoded credential bytes.
username checked
Encoding does not hide the username
Anyone holding the header text can base-sixty-four decode the token in this toy example.
decoded, not decrypted
Summary
The username is just the first part of the decoded Basic credential.
username split checked