[tumblr] Use correct object class for Oauth token in library/tumblroauth

- Addresses https://github.com/friendica/friendica/issues/7675#issuecomment-564648263
pull/919/head
Benjamin Lorteau 2019-12-11 13:19:32 -05:00
parent f8e0df1f71
commit 9e27e3061c
1 changed files with 4 additions and 5 deletions

View File

@ -76,7 +76,7 @@ class TumblrOAuth
$this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
$this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
if (!empty($oauth_token) && !empty($oauth_token_secret)) {
$this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
$this->token = new OAuthToken($oauth_token, $oauth_token_secret);
} else {
$this->token = null;
}
@ -97,7 +97,7 @@ class TumblrOAuth
$request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
$token = OAuthUtil::parse_parameters($request);
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
$this->token = new OAuthToken($token['oauth_token'], $token['oauth_token_secret']);
return $token;
}
@ -140,7 +140,7 @@ class TumblrOAuth
$request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters);
$token = OAuthUtil::parse_parameters($request);
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
$this->token = new OAuthToken($token['oauth_token'], $token['oauth_token_secret']);
return $token;
}
@ -164,7 +164,7 @@ class TumblrOAuth
$parameters['x_auth_mode'] = 'client_auth';
$request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);
$token = OAuthUtil::parse_parameters($request);
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
$this->token = new OAuthToken($token['oauth_token'], $token['oauth_token_secret']);
return $token;
}
@ -247,7 +247,6 @@ class TumblrOAuth
/**
* Make an HTTP request
*
*
* @param string $url
* @param string $method
* @param mixed $postfields