| 1 | <?php |
||
| 5 | class AccessToken extends \League\OAuth2\Client\Token\AccessToken |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * All Salesforce Organisation IDs start with this Prefix |
||
| 9 | */ |
||
| 10 | const ORG_ID_PREFIX = '00D'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Instance URL |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $instanceUrl; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructs an access token. |
||
| 21 | * |
||
| 22 | * @param array $options An array of options returned by the service provider |
||
| 23 | * in the access token request. The `access_token` option is required. |
||
| 24 | */ |
||
| 25 | 4 | public function __construct(array $options) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Returns Salesforce instance URL related to Access Token |
||
| 34 | * |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 2 | public function getInstanceUrl() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Returns Organisation ID related to Access Token |
||
| 44 | * |
||
| 45 | * @return string|null |
||
| 46 | */ |
||
| 47 | 6 | public function getOrgId() |
|
| 53 | } |
||
| 54 |