Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| TokenDetails | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | namespace Ably\Models; |
| 3 | |
| 4 | /** |
| 5 | * Class representing a token |
| 6 | */ |
| 7 | class TokenDetails extends BaseOptions { |
| 8 | |
| 9 | /** |
| 10 | * @var string The token itself |
| 11 | */ |
| 12 | public $token; |
| 13 | |
| 14 | /** |
| 15 | * @var integer The time (in millis since the epoch) at which this token expires. |
| 16 | */ |
| 17 | public $expires; |
| 18 | |
| 19 | /** |
| 20 | * @var integer The time (in millis since the epoch) at which this token was issued. |
| 21 | */ |
| 22 | public $issued; |
| 23 | |
| 24 | /** |
| 25 | * @var string A json_encoded capability associated with this token. See the Ably Authentication |
| 26 | * documentation for details. |
| 27 | */ |
| 28 | public $capability; |
| 29 | |
| 30 | /** |
| 31 | * @var string The clientId, if any, bound to this token. If a clientId is included, |
| 32 | * then the token authenticates its bearer as that clientId, and the |
| 33 | * token may only be used to perform operations on behalf of that clientId. |
| 34 | */ |
| 35 | public $clientId; |
| 36 | |
| 37 | /** |
| 38 | * @param string|array $options |
| 39 | */ |
| 40 | public function __construct( $options = [] ) { |
| 41 | if (is_string( $options )) { |
| 42 | $this->token = $options; |
| 43 | } else { |
| 44 | parent::__construct( $options ); |
| 45 | } |
| 46 | } |
| 47 | } |