for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SocialConnect project
* @author: Patsura Dmitry https://github.com/ovr <[email protected]>
*/
declare(strict_types=1);
namespace SocialConnect\OAuth1;
class Token
{
* @var string
protected $key;
protected $secret;
* @param string $key
* @param string $secret
public function __construct($key, $secret)
$this->key = $key;
$this->secret = $secret;
}
* Generates the basic string serialization of a token that a server
* would respond to request_token and access_token calls with
*
* @return string
public function __toString()
return sprintf(
"oauth_token=%s&oauth_token_secret=%s",
Util::urldecodeRFC3986($this->key),
Util::urldecodeRFC3986($this->secret)
);
public function getKey()
return $this->key;
public function getSecret()
return $this->secret;