Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
Show All 15 Lines | abstract class PhabricatorOAuth1AuthProvider | ||||
protected function getSecretKey() { | protected function getSecretKey() { | ||||
return self::PROPERTY_CONSUMER_SECRET; | return self::PROPERTY_CONSUMER_SECRET; | ||||
} | } | ||||
protected function configureAdapter(PhutilOAuth1AuthAdapter $adapter) { | protected function configureAdapter(PhutilOAuth1AuthAdapter $adapter) { | ||||
$config = $this->getProviderConfig(); | $config = $this->getProviderConfig(); | ||||
$adapter->setConsumerKey($config->getProperty(self::PROPERTY_CONSUMER_KEY)); | $adapter->setConsumerKey($config->getProperty(self::PROPERTY_CONSUMER_KEY)); | ||||
$secret = $config->getProperty(self::PROPERTY_CONSUMER_SECRET); | $secret = $config->getProperty(self::PROPERTY_CONSUMER_SECRET); | ||||
if (strlen($secret)) { | if (phutil_nonempty_string($secret)) { | ||||
$adapter->setConsumerSecret(new PhutilOpaqueEnvelope($secret)); | $adapter->setConsumerSecret(new PhutilOpaqueEnvelope($secret)); | ||||
} | } | ||||
$adapter->setCallbackURI(PhabricatorEnv::getURI($this->getLoginURI())); | $adapter->setCallbackURI(PhabricatorEnv::getURI($this->getLoginURI())); | ||||
return $adapter; | return $adapter; | ||||
} | } | ||||
protected function renderLoginForm(AphrontRequest $request, $mode) { | protected function renderLoginForm(AphrontRequest $request, $mode) { | ||||
$attributes = array( | $attributes = array( | ||||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |