-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters