Created
April 24, 2018 17:23
-
-
Save mhou1981/93c0b70c55c862c391897785cbe2ea27 to your computer and use it in GitHub Desktop.
Encode HTTP Basic Auth Credential
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username='Test' | |
password='123' | |
credentials="$(echo -n "${username}:${password}" | base64)" | |
echo "Authorization: Basic ${credentials}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment