From 055563387a53c0df195bb0cf62f57eb0ffed89d1 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Fri, 1 Nov 2013 16:04:27 +0100 Subject: [PATCH] templetize curl auth examples --- content/v3/auth.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content/v3/auth.md b/content/v3/auth.md index abd9f51df7..da71a52b03 100644 --- a/content/v3/auth.md +++ b/content/v3/auth.md @@ -30,22 +30,23 @@ To use Basic Authentication with the GitHub API, simply send the username and password associated with the account. For example, if you're accessing the API via [cURL][curl], the following command -would authenticate with `mojombo` as the username. (cURL will prompt you to -enter the password.) +would authenticate you if you replace `` with your GitHub username. +(cURL will prompt you to enter the password.)
-curl -u mojombo https://api.github.com/user
+curl -u  https://api.github.com/user
 
### Via OAuth Tokens Alternatively, you can authenticate using [personal access tokens][personal-access-tokens] or OAuth tokens. To do so, provide the token as -the username and provide a blank password or a password of `x-oauth-basic`. For -example: +the username and provide a blank password or a password of `x-oauth-basic`. If +you're accessing the API via cURL, replace `` with your OAuth token in +the following command:
-curl -u 3816d821c80a6847ca84550052c1ff6246e8169b:x-oauth-basic https://api.github.com/user
+curl -u :x-oauth-basic https://api.github.com/user
 
This approach is useful if your tools only support Basic Authentication but you