Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
Context not available. | |||||
$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 (@strlen($secret)) { | ||||
$adapter->setConsumerSecret(new PhutilOpaqueEnvelope($secret)); | $adapter->setConsumerSecret(new PhutilOpaqueEnvelope($secret)); | ||||
} | } | ||||
$adapter->setCallbackURI(PhabricatorEnv::getURI($this->getLoginURI())); | $adapter->setCallbackURI(PhabricatorEnv::getURI($this->getLoginURI())); | ||||
Context not available. | |||||
} | } | ||||
$denied = $request->getStr('denied'); | $denied = $request->getStr('denied'); | ||||
if (strlen($denied)) { | if (@strlen($denied)) { | ||||
// Twitter indicates that the user cancelled the login attempt by | // Twitter indicates that the user cancelled the login attempt by | ||||
// returning "denied" as a parameter. | // returning "denied" as a parameter. | ||||
throw new PhutilAuthUserAbortedException(); | throw new PhutilAuthUserAbortedException(); | ||||
Context not available. | |||||
switch ($key) { | switch ($key) { | ||||
case self::PROPERTY_CONSUMER_KEY: | case self::PROPERTY_CONSUMER_KEY: | ||||
if (strlen($old)) { | if (@strlen($old)) { | ||||
return pht( | return pht( | ||||
'%s updated the OAuth consumer key for this provider from '. | '%s updated the OAuth consumer key for this provider from '. | ||||
'"%s" to "%s".', | '"%s" to "%s".', | ||||
Context not available. | |||||
$new); | $new); | ||||
} | } | ||||
case self::PROPERTY_CONSUMER_SECRET: | case self::PROPERTY_CONSUMER_SECRET: | ||||
if (strlen($old)) { | if (@strlen($old)) { | ||||
return pht( | return pht( | ||||
'%s updated the OAuth consumer secret for this provider.', | '%s updated the OAuth consumer secret for this provider.', | ||||
$xaction->renderHandleLink($author_phid)); | $xaction->renderHandleLink($author_phid)); | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0