for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xsolve\SalesforceClient\Security\Token;
/**
* Basic implementation of TokenInterace.
*/
class Token implements TokenInterface
{
* @var string
protected $tokenType;
protected $accessToken;
protected $refreshToken;
protected $instanceUrl;
* @param string $tokenType
* @param string $accessToken
* @param string $instanceUrl
* @param string $refreshToken
public function __construct(string $tokenType, string $accessToken, string $instanceUrl, string $refreshToken = '')
$this->tokenType = $tokenType;
$this->accessToken = $accessToken;
$this->refreshToken = $refreshToken;
$this->instanceUrl = $instanceUrl;
}
* {@inheritdoc}
public function getTokenType(): string
return $this->tokenType;
public function getAccessToken(): string
return $this->accessToken;
public function getRefreshToken(): string
return $this->refreshToken;
public function getInstanceUrl(): string
return $this->instanceUrl;
public function serialize(): string
return serialize([
$this->tokenType,
$this->accessToken,
$this->instanceUrl,
$this->refreshToken,
]);
public function unserialize($serialized)
list(
$this->refreshToken
) = unserialize($serialized);