Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorAuthProviderOAuth.php
Show All 31 Lines | abstract class PhabricatorAuthProviderOAuth extends PhabricatorAuthProvider { | ||||
public function isLoginFormAButton() { | public function isLoginFormAButton() { | ||||
return true; | return true; | ||||
} | } | ||||
protected function renderLoginForm(AphrontRequest $request, $mode) { | protected function renderLoginForm(AphrontRequest $request, $mode) { | ||||
$adapter = $this->getAdapter(); | $adapter = $this->getAdapter(); | ||||
$adapter->setState(PhabricatorHash::digest($request->getCookie('phcid'))); | $adapter->setState(PhabricatorHash::digest($request->getCookie('phcid'))); | ||||
$scope = $request->getStr("scope"); | |||||
if ($scope) { | |||||
$adapter->setScope($scope); | |||||
} | |||||
$attributes = array( | $attributes = array( | ||||
'method' => 'GET', | 'method' => 'GET', | ||||
'uri' => $adapter->getAuthenticateURI(), | 'uri' => $adapter->getAuthenticateURI(), | ||||
); | ); | ||||
return $this->renderStandardLoginButton($request, $mode, $attributes); | return $this->renderStandardLoginButton($request, $mode, $attributes); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |