Skip to content

Instantly share code, notes, and snippets.

View lukeenterprise's full-sized avatar
🌴
On vacation..

Luke outdoors & supply LLC lukeenterprise

🌴
On vacation..
View GitHub Profile
@lukeenterprise
lukeenterprise / OT
Created April 29, 2019 19:22
via oauth tokens
Via OAuth Tokens
Alternatively, you can use personal access tokens or OAuth tokens instead of your password.
curl -u username:token https://api.github.com/user
This approach is useful if your tools only support Basic Authentication but you want to take advantage of OAuth access token security features.
Authenticating for SAML SSO
Note: Integrations and OAuth applications that generate tokens on behalf of others are automatically whitelisted.
If you're using the API to access an organization that enforces SAML SSO for authentication, you'll need to create a personal access token (PAT) and whitelist the token for that organization. Visit the URL specified in X-GitHub-SSO to whitelist the token for the organization.
curl -v -H "Authorization: token TOKEN" https://api.github.com/repos/octodocs-test/test