| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* This file is part of the league/oauth2-client library |
| 5 |
* |
| 6 |
* For the full copyright and license information, please view the LICENSE |
| 7 |
* file that was distributed with this source code. |
| 8 |
* |
| 9 |
* @copyright Copyright (c) Alex Bilbie <hello@alexbilbie.com> |
| 10 |
* @license http://opensource.org/licenses/MIT MIT |
| 11 |
* @link http://thephpleague.com/oauth2-client/ Documentation |
| 12 |
* @link https://packagist.org/packages/league/oauth2-client Packagist |
| 13 |
* @link https://github.com/thephpleague/oauth2-client GitHub |
| 14 |
*/ |
| 15 |
namespace YoastSEO_Vendor\League\OAuth2\Client\Token; |
| 16 |
|
| 17 |
use JsonSerializable; |
| 18 |
use ReturnTypeWillChange; |
| 19 |
use RuntimeException; |
| 20 |
interface AccessTokenInterface extends \JsonSerializable |
| 21 |
{ |
| 22 |
/** |
| 23 |
* Returns the access token string of this instance. |
| 24 |
* |
| 25 |
* @return string |
| 26 |
*/ |
| 27 |
public function getToken(); |
| 28 |
/** |
| 29 |
* Returns the refresh token, if defined. |
| 30 |
* |
| 31 |
* @return string|null |
| 32 |
*/ |
| 33 |
public function getRefreshToken(); |
| 34 |
/** |
| 35 |
* Returns the expiration timestamp in seconds, if defined. |
| 36 |
* |
| 37 |
* @return integer|null |
| 38 |
*/ |
| 39 |
public function getExpires(); |
| 40 |
/** |
| 41 |
* Checks if this token has expired. |
| 42 |
* |
| 43 |
* @return boolean true if the token has expired, false otherwise. |
| 44 |
* @throws RuntimeException if 'expires' is not set on the token. |
| 45 |
*/ |
| 46 |
public function hasExpired(); |
| 47 |
/** |
| 48 |
* Returns additional vendor values stored in the token. |
| 49 |
* |
| 50 |
* @return array |
| 51 |
*/ |
| 52 |
public function getValues(); |
| 53 |
/** |
| 54 |
* Returns a string representation of the access token |
| 55 |
* |
| 56 |
* @return string |
| 57 |
*/ |
| 58 |
public function __toString(); |
| 59 |
/** |
| 60 |
* Returns an array of parameters to serialize when this is serialized with |
| 61 |
* json_encode(). |
| 62 |
* |
| 63 |
* @return array |
| 64 |
*/ |
| 65 |
#[ReturnTypeWillChange] |
| 66 |
public function jsonSerialize(); |
| 67 |
} |
| 68 |
|