1 | <?php declare(strict_types=1); |
||
14 | class Token extends OperatorResource implements Creatable, Retrievable, \OpenStack\Common\Auth\Token |
||
15 | { |
||
16 | /** @var array */ |
||
17 | public $methods; |
||
18 | |||
19 | /** @var []Role */ |
||
20 | public $roles; |
||
21 | |||
22 | /** @var \DateTimeImmutable */ |
||
23 | public $expires; |
||
24 | |||
25 | /** @var Project */ |
||
26 | public $project; |
||
27 | |||
28 | /** @var Catalog */ |
||
29 | public $catalog; |
||
30 | |||
31 | /** @var mixed */ |
||
32 | public $extras; |
||
33 | |||
34 | /** @var User */ |
||
35 | public $user; |
||
36 | |||
37 | /** @var \DateTimeImmutable */ |
||
38 | public $issued; |
||
39 | |||
40 | /** @var string */ |
||
41 | public $id; |
||
42 | |||
43 | protected $resourceKey = 'token'; |
||
44 | protected $resourcesKey = 'tokens'; |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | protected static function getAlias(): Alias |
||
65 | 1 | ||
66 | /** |
||
67 | 1 | * {@inheritDoc} |
|
68 | */ |
||
69 | public function populateFromResponse(ResponseInterface $response) |
||
75 | 1 | ||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getId(): string |
||
83 | 1 | ||
84 | /** |
||
85 | 1 | * @return bool TRUE if the token has expired (and is invalid); FALSE otherwise. |
|
86 | 1 | */ |
|
87 | public function hasExpired(): bool |
||
91 | |||
92 | /** |
||
93 | 10 | * {@inheritDoc} |
|
94 | */ |
||
95 | 10 | public function retrieve() |
|
100 | |||
101 | 1 | /** |
|
102 | 1 | * {@inheritDoc} |
|
103 | * |
||
104 | 9 | * @param array $data {@see \OpenStack\Identity\v3\Api::postTokens} |
|
105 | 1 | */ |
|
106 | 1 | public function create(array $data): Creatable |
|
126 | } |
||
127 |