-
Notifications
You must be signed in to change notification settings - Fork 30
GitHub
Damien edited this page May 26, 2016
·
2 revisions
let github: Provider = .GitHub(
clientID: "***",
clientSecret: "***",
redirectURL: "foo://callback"
)
{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a", "scope":"repo,gist", "token_type":"bearer"}
Name | Description |
---|---|
(no scope) |
Grants read-only access to public information (includes public user profile info, public repository info, and gists) |
user |
Grants read/write access to profile info only. Note that this scope includes user:email and user:follow . |
user:email |
Grants read access to a user's email addresses. |
user:follow |
Grants access to follow or unfollow other users. |
public_repo |
Grants read/write access to code, commit statuses, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories. |
repo |
Grants read/write access to code, commit statuses, collaborators, and deployment statuses for public and private repositories and organizations. |
repo_deployment |
Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code. |
repo:status |
Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code. |
delete_repo |
Grants access to delete adminable repositories. |
notifications |
Grants read access to a user's notifications. repo also provides this access. |
gist |
Grants write access to gists. |
read:repo_hook |
Grants read and ping access to hooks in public or private repositories. |
write:repo_hook |
Grants read, write, and ping access to hooks in public or private repositories. |
admin:repo_hook |
Grants read, write, ping, and delete access to hooks in public or private repositories. |
admin:org_hook |
Grants read, write, ping, and delete access to organization hooks. Note: OAuth tokens will only be able to perform these actions on organization hooks which were created by the OAuth application. Personal access tokens will only be able to perform these actions on organization hooks created by a user. |
read:org |
Read-only access to organization, teams, and membership. |
write:org |
Publicize and unpublicize organization membership. |
admin:org |
Fully manage organization, teams, and memberships. |
read:public_key |
List and view details for public keys. |
write:public_key |
Create, list, and view details for public keys. |
admin:public_key |
Fully manage public keys. |
read:gpg_key |
List and view details for GPG keys. |
write:gpg_key |
Create, list, and view details for GPG keys. |
admin:gpg_key |
Fully manage GPG keys. |
Name | Type | Description |
---|---|---|
client_id |
string |
Required. The client ID you received from GitHub when you registered. |
redirect_uri |
string |
The URL in your app where users will be sent after authorization. See details below about redirect urls. |
scope |
string |
A space delimited list of scopes. If not provided, scope defaults to an empty list of scopes for users that don't have a valid token for the app. For users who do already have a valid token for the app, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the same scopes that were used last time the user completed the flow. |
state |
string |
An unguessable random string. It is used to protect against cross-site request forgery attacks. |
allow_signup |
string |
Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. The default is true . Use false in the case that a policy prohibits signups. |
Name | Type | Description |
---|---|---|
client_id |
string |
Required. The client ID you received from GitHub when you registered. |
client_secret |
string |
Required. The client secret you received from GitHub when you registered. |
code |
string |
Required. The code you received as a response to Step 1. |
redirect_uri |
string |
The URL in your app where users will be sent after authorization. See details below about redirect urls. |
state |
string |
The unguessable random string you optionally provided in Step 1. |