Last active
July 14, 2017 09:03
-
-
Save mb-14/5dae09cf00207027ce538c49e65b213c to your computer and use it in GitHub Desktop.
Basic Authentication
This file contains 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
String key = "YOUR_KEY"; | |
String secret = "SECRET"; | |
String auth = "Basic " + Base64.getEncoder().encodeToString((key + ":" + secret).getBytes("utf-8")); | |
// Header | |
// key: "Authorization" | |
// value: <auth> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment