Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/adapter/PhutilOAuth1AuthAdapter.php
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | if ($confirmed !== 'true') { | ||||
pht("Expected '%s' to be '%s'!", 'oauth_callback_confirmed', 'true')); | pht("Expected '%s' to be '%s'!", 'oauth_callback_confirmed', 'true')); | ||||
} | } | ||||
$this->readTokenAndTokenSecret($data); | $this->readTokenAndTokenSecret($data); | ||||
$authorize_token_uri = new PhutilURI($this->getAuthorizeTokenURI()); | $authorize_token_uri = new PhutilURI($this->getAuthorizeTokenURI()); | ||||
$authorize_token_uri->replaceQueryParam('oauth_token', $this->getToken()); | $authorize_token_uri->replaceQueryParam('oauth_token', $this->getToken()); | ||||
return (string)$authorize_token_uri; | return phutil_string_cast($authorize_token_uri); | ||||
} | } | ||||
protected function finishOAuthHandshake() { | protected function finishOAuthHandshake() { | ||||
$this->willFinishOAuthHandshake(); | $this->willFinishOAuthHandshake(); | ||||
if (!$this->getToken()) { | if (!$this->getToken()) { | ||||
throw new Exception(pht('Expected token to finish OAuth handshake!')); | throw new Exception(pht('Expected token to finish OAuth handshake!')); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |