[bug fix] GHES 3.0 and earlier incorrectly includes OAuth Device Flow beta Documentation (#21244)
* Update versioning for GHES * fix spacing * Add reviewer feedback * Version other mentions of "device flow"
This commit is contained in:
@@ -24,8 +24,12 @@ When your GitHub App acts on behalf of a user, it performs user-to-server reques
|
|||||||
|
|
||||||
To authorize users for standard apps that run in the browser, use the [web application flow](#web-application-flow).
|
To authorize users for standard apps that run in the browser, use the [web application flow](#web-application-flow).
|
||||||
|
|
||||||
|
{% ifversion fpt or ghae or ghes > 3.0 %}
|
||||||
|
|
||||||
To authorize users for headless apps without direct access to the browser, such as CLI tools or Git credential managers, use the [device flow](#device-flow). The device flow uses the OAuth 2.0 [Device Authorization Grant](https://tools.ietf.org/html/rfc8628).
|
To authorize users for headless apps without direct access to the browser, such as CLI tools or Git credential managers, use the [device flow](#device-flow). The device flow uses the OAuth 2.0 [Device Authorization Grant](https://tools.ietf.org/html/rfc8628).
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
## Web application flow
|
## Web application flow
|
||||||
|
|
||||||
Using the web application flow, the process to identify users on your site is:
|
Using the web application flow, the process to identify users on your site is:
|
||||||
@@ -112,20 +116,22 @@ For example, in curl you can set the Authorization header like this:
|
|||||||
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
|
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% ifversion fpt or ghae or ghes > 3.0 %}
|
||||||
|
|
||||||
## Device flow
|
## Device flow
|
||||||
|
|
||||||
{% ifversion ghes < 3.1 %}
|
|
||||||
{% note %}
|
{% note %}
|
||||||
|
|
||||||
**Note:** The device flow is in public beta and subject to change.
|
**Note:** The device flow is in public beta and subject to change.
|
||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
|
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
|
||||||
|
|
||||||
For more information about authorizing users using the device flow, see "[Authorizing OAuth Apps](/developers/apps/authorizing-oauth-apps#device-flow)".
|
For more information about authorizing users using the device flow, see "[Authorizing OAuth Apps](/developers/apps/authorizing-oauth-apps#device-flow)".
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
## Check which installation's resources a user can access
|
## Check which installation's resources a user can access
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ If you want to skip authorizing your app in the standard way, such as when testi
|
|||||||
|
|
||||||
To authorize your OAuth app, consider which authorization flow best fits your app.
|
To authorize your OAuth app, consider which authorization flow best fits your app.
|
||||||
|
|
||||||
- [web application flow](#web-application-flow): Used to authorize users for standard OAuth apps that run in the browser. (The [implicit grant type](https://tools.ietf.org/html/rfc6749#section-4.2) is not supported.)
|
- [web application flow](#web-application-flow): Used to authorize users for standard OAuth apps that run in the browser. (The [implicit grant type](https://tools.ietf.org/html/rfc6749#section-4.2) is not supported.){% ifversion fpt or ghae or ghes > 3.0 %}
|
||||||
- [device flow](#device-flow): Used for headless apps, such as CLI tools.
|
- [device flow](#device-flow): Used for headless apps, such as CLI tools.{% endif %}
|
||||||
|
|
||||||
## Web application flow
|
## Web application flow
|
||||||
|
|
||||||
@@ -105,15 +105,15 @@ For example, in curl you can set the Authorization header like this:
|
|||||||
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
|
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% ifversion fpt or ghae or ghes > 3.0 %}
|
||||||
|
|
||||||
## Device flow
|
## Device flow
|
||||||
|
|
||||||
{% ifversion ghes < 3.1 %}
|
|
||||||
{% note %}
|
{% note %}
|
||||||
|
|
||||||
**Note:** The device flow is in public beta and subject to change.
|
**Note:** The device flow is in public beta and subject to change.
|
||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
|
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
|
||||||
|
|
||||||
@@ -224,6 +224,8 @@ If you make more than one access token request (`POST {% data variables.product.
|
|||||||
|
|
||||||
For more information, see the "[OAuth 2.0 Device Authorization Grant](https://tools.ietf.org/html/rfc8628#section-3.5)."
|
For more information, see the "[OAuth 2.0 Device Authorization Grant](https://tools.ietf.org/html/rfc8628#section-3.5)."
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
## Non-Web application flow
|
## Non-Web application flow
|
||||||
|
|
||||||
Non-web authentication is available for limited situations like testing. If you need to, you can use [Basic Authentication](/rest/overview/other-authentication-methods#basic-authentication) to create a personal access token using your [Personal access tokens settings page](/articles/creating-an-access-token-for-command-line-use). This technique enables the user to revoke access at any time.
|
Non-web authentication is available for limited situations like testing. If you need to, you can use [Basic Authentication](/rest/overview/other-authentication-methods#basic-authentication) to create a personal access token using your [Personal access tokens settings page](/articles/creating-an-access-token-for-command-line-use). This technique enables the user to revoke access at any time.
|
||||||
|
|||||||
Reference in New Issue
Block a user