Total Complexity | 1 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
21 | class UserApi extends BaseLinodeApi |
||
22 | { |
||
23 | /** |
||
24 | * Authenticates a Linode Manager user against their username, password, and two-factor token (when |
||
25 | * enabled), and then returns a new API key, which can be used until it expires. The number of active |
||
26 | * keys is limited to 20. Batch requests will be rejected if they include this API action. |
||
27 | * |
||
28 | * @param string $username [required] |
||
29 | * @param string $password [required] |
||
30 | * @param string $token [optional] Required when two-factor authentication is enabled. Emergency scratch codes are not permitted. |
||
31 | * @param int $expires [optional] Number of hours the key will remain valid, between 0 and 8760. 0 means no expiration. Defaults to 168. |
||
32 | * @param string $label [optional] An optional label for this key. |
||
33 | * |
||
34 | * @return array |
||
35 | */ |
||
36 | 1 | public function getApiKey($username, $password, $token = null, $expires = null, $label = null) |
|
47 |