Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit905164e

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parenta243780 commit905164e

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

‎content/v3/oauth.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: OAuth
66

77
{:toc}
88

9-
OAuth2 is a protocol that lets externalapps request authorization to
9+
OAuth2 is a protocol that lets externalapplications request authorization to
1010
private details in a user's {{ site.data.variables.product.product_name }} account without getting their
1111
password. This is preferred over[Basic Authentication](/v3/auth#basic-authentication) because tokens can
1212
be limited to specific types of data, and can be revoked by users at any
@@ -34,8 +34,8 @@ This is a description of the OAuth2 flow from 3rd party web sites.
3434
Name | Type | Description
3535
-----|------|--------------
3636
`client_id`|`string` |**Required**. The client ID you received from GitHub when you[registered](https://github.com/settings/applications/new).
37-
`redirect_uri`|`string` | The URL in yourapp where users will be sent after authorization. See details below about[redirect urls](#redirect-urls).
38-
`scope`|`string` | A space delimited list of[scopes](#scopes). If not provided,`scope` defaults to an empty listof scopesfor users thatdon'thavea valid tokenfor theapp. For users whodo alreadyhavea valid tokenfor theapp, 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 thesamescopesthat were used last time the usercompletedthe flow.
37+
`redirect_uri`|`string` | The URL in yourapplication where users will be sent after authorization. See details below about[redirect urls](#redirect-urls).
38+
`scope`|`string` | A space delimited list of[scopes](#scopes). If not provided,`scope` defaults to an empty list for users that havenot authorized any scopesfor theapplication. For users who haveauthorized scopesfor theapplication, 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 theset ofscopesthe user has authorized for theapplication. For example, if auserhas already performedthewebflow twice and has authorized one token with`user` scope and another token with`repo` scope, a third web flow that does not provide a`scope` will receive a token with`user` and`repo` scope.
3939
`state`|`string` | An unguessable random string. It is used to protect against cross-site request forgery attacks.
4040
`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.
4141

@@ -57,7 +57,7 @@ Name | Type | Description
5757
`client_id`|`string` |**Required**. The client ID you received from GitHub when you[registered](https://github.com/settings/applications/new).
5858
`client_secret`|`string` |**Required**. The client secret you received from GitHub when you[registered](https://github.com/settings/applications/new).
5959
`code`|`string` |**Required**. The code you received as a response to[Step 1](#1-redirect-users-to-request-github-access).
60-
`redirect_uri`|`string` | The URL in yourapp where users will be sent after authorization. See details below about[redirect urls](#redirect-urls).
60+
`redirect_uri`|`string` | The URL in yourapplication where users will be sent after authorization. See details below about[redirect urls](#redirect-urls).
6161
`state`|`string` | The unguessable random string you optionally provided in[Step 1](#1-redirect-users-to-request-github-access).
6262

6363
###Response
@@ -79,6 +79,19 @@ header:
7979
<access_token>e72e16c7e42f292c6912e7710c838347ae178b4a</access_token>
8080
</OAuth>
8181

82+
####Multiple tokens
83+
84+
GitHub allows multiple tokens to exist for a user/application/scope combination.
85+
This can be used to create tokens for specific use cases. For example, your
86+
application might support one workflow that uses GitHub for sign in, and only
87+
requires basic user information. And, your application might support a different
88+
workflow that requires access to a user's private repositories. Using multiple
89+
tokens, your application can perform the web flow for each use case, requesting
90+
only the scopes needed. If a user only uses your application to sign in, they
91+
are never required to grant your application access to their private
92+
repositories. Note, there is a limit to the number of tokens that are issued per
93+
user/application/scope combination. If your application requests enough tokens
94+
to go over one of the limits, older tokens will stop working.
8295

8396
####Requested scopes vs. granted scopes
8497

@@ -319,7 +332,7 @@ and get a new code.
319332
Users can review and revoke their application authorizations from the[settings
320333
screen within GitHub][authorized-apps]. A user's organizations[control whether
321334
an application can access organization data][org-app-policies]. Integrators can
322-
deep link to the authorization information for their particularapp to let their
335+
deep link to the authorization information for their particularapplication to let their
323336
end users review these details.
324337

325338
To build this link, you'll need your OAuth application's`client_id` you

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp