Page MenuHomePhabricator

D16763.id40391.diff
No OneTemporary

D16763.id40391.diff

diff --git a/src/applications/oauthserver/controller/PhabricatorOAuthServerTokenController.php b/src/applications/oauthserver/controller/PhabricatorOAuthServerTokenController.php
--- a/src/applications/oauthserver/controller/PhabricatorOAuthServerTokenController.php
+++ b/src/applications/oauthserver/controller/PhabricatorOAuthServerTokenController.php
@@ -18,11 +18,17 @@
$grant_type = $request->getStr('grant_type');
$code = $request->getStr('code');
$redirect_uri = $request->getStr('redirect_uri');
- $client_phid = $request->getStr('client_id');
- $client_secret = $request->getStr('client_secret');
$response = new PhabricatorOAuthResponse();
$server = new PhabricatorOAuthServer();
+ $client_phid = idx($_SERVER, 'PHP_AUTH_USER');
+ $client_secret = idx($_SERVER, 'PHP_AUTH_PW');
+
+ if (!$client_phid && !$client_secret) {
+ $client_phid = $request->getStr('client_id');
+ $client_secret = $request->getStr('client_secret');
+ }
+
if ($grant_type != 'authorization_code') {
$response->setError('unsupported_grant_type');
$response->setErrorDescription(

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 25, 1:49 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735643
Default Alt Text
D16763.id40391.diff (1 KB)

Event Timeline