public function authorize() { $token = Consumer::token('request'); if (is_string($token)) { return $token; } Session::write('oauth.request', $token); $this->redirect(Consumer::authorize($token)); }
public function authorize() { Session::delete('oauth.request'); Session::delete('oauth.access'); $token = Consumer::token('request', array('params' => array('oauth_callback' => 'http://local.moodpik.com/tweet/success'))); if (is_string($token)) { return $token; } Session::write('oauth.request', $token); $this->redirect(Consumer::authorize($token)); }
public function testAuthorize() { $expected = 'http://localhost/oauth/authorize?oauth_token=requestkey'; $result = Consumer::authorize(array('oauth_token' => 'requestkey', 'oauth_token_secret' => 'requestsecret')); $this->assertEqual($expected, $result); }