Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15304548
D20964.id49955.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
891 B
Referenced Files
None
Subscribers
None
D20964.id49955.diff
View Options
diff --git a/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php b/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
@@ -51,13 +51,17 @@
protected function loadOAuthAccountData() {
$uri = new PhutilURI('https://api.github.com/user');
- $uri->replaceQueryParam('access_token', $this->getAccessToken());
$future = new HTTPSFuture($uri);
// NOTE: GitHub requires a User-Agent string.
$future->addHeader('User-Agent', __CLASS__);
+ // See T13485. Circa early 2020, GitHub has deprecated use of the
+ // "access_token" URI parameter.
+ $token_header = sprintf('token %s', $this->getAccessToken());
+ $future->addHeader('Authorization', $token_header);
+
list($body) = $future->resolvex();
try {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 1:52 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7313489
Default Alt Text
D20964.id49955.diff (891 B)
Attached To
Mode
D20964: Update GitHub API calls to use "Authorization" header instead of "access_token" URI parameter
Attached
Detach File
Event Timeline
Log In to Comment