Skip to content

Instantly share code, notes, and snippets.

@mb-14
Last active July 14, 2017 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mb-14/5dae09cf00207027ce538c49e65b213c to your computer and use it in GitHub Desktop.
Save mb-14/5dae09cf00207027ce538c49e65b213c to your computer and use it in GitHub Desktop.
Basic Authentication
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