private function generateAuthString($apiCred, $accessToken, $tokenSecret, $endpoint)
 {
     $key = $apiCred->getUserName();
     $secret = $apiCred->getPassword();
     $auth = new AuthSignature();
     $response = $auth->genSign($key, $secret, $accessToken, $tokenSecret, 'POST', $endpoint);
     $authString = "token=" . $accessToken . ",signature=" . $response['oauth_signature'] . ",timestamp=" . $response['oauth_timestamp'];
     return $authString;
 }
Ejemplo n.º 2
0
 public static function generateFullAuthString($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint)
 {
     $authSignature = new AuthSignature();
     $response = $authSignature->genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint);
     return "token=" . $token . ",signature=" . $response['oauth_signature'] . ",timestamp=" . $response['oauth_timestamp'];
 }