CSharpRU/vault-php

LeaseTrait leaseId should be a string not int

cmlara opened this issue · 0 comments

Currently LeaseTrait::$leaseId is an 'int|null' and LeaseTrait::getLeaseId() return an integer or null.

An example of the response on $client->read() for $leaseId against the AWS vault backend shows a string of aws/creds/test/QALQZOlBOnl5LsFReqohr7gl which when calling getLease() causes a TypeError NOTICE: PHP message: TypeError: Vault\ResponseModels\Response::getLeaseId(): Return value must be of type ?int, string returned in /var/www/html/vendor/csharpru/vault-php/src/ResponseModels/Traits/LeaseTrait.php on line 32

https://www.vaultproject.io/api-docs/system/leases also appears to indicate this should be a string.

{
  "id": "auth/token/create/25c75065466dfc5f920525feafe47502c4c9915c",
  "issue_time": "2017-04-30T10:18:11.228946471-04:00",
  "expire_time": "2017-04-30T11:18:11.228946708-04:00",
  "last_renewal_time": null,
  "renewable": true,
  "ttl": 3558
}