Files
octokit.net/Octokit
Gudge c1c6366a63 Update OAuth Token operations to new APIs (#2116)
* Update OAuth Token operations to new APIs

Per ['Deprecating OAuth Application API'](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/)
the HTTP API endpoints called by CheckApplicationAuthentication,
ResetApplicationAuthentication and RevokeApplicationAuthentication are
being deprecated.

This PR updates those APIs to call the new HTTP API endpoints as
documented at the above link.

* Details

Amend CheckApplicationAuthentication, ResetApplicationAuthentication and
RevokeApplicationAuthentication to create an object containing the OAuth
access token and to call the single arg version of
ApiUrls.ApplicationAuthorization. The object is used as the request
body.

Amend CheckApplicationAuthentication to use POST.

Amend ResetApplicationAuthentication to use PATCH.

Remove the two arg version of ApiUrls.ApplicationAuthorization as it is
no longer called. Amend the single arg version to use the new API path.

Amend unit tests to account for the above changes.

* Update unit tests to check request payload

Add a check to the unit tests to verify that the request payload
contains an access_token field with the expected value.
2020-03-02 15:01:34 -04:00
..
2019-10-30 13:51:20 -03:00
2019-10-30 13:51:20 -03:00
2019-10-30 13:51:20 -03:00