Lazy authentication
kluvi opened this issue · 3 comments
kluvi commented
Is your feature request related to a problem? Please describe.
PVE class automatically authenticates right in the constructor, which is not necessary and may slow-down loading of application. It happens in situations, when we for some reason wanted to create instance of PVE, but does not make any calls to API.
Describe the solution you'd like
Remove $this->getApi()->login();
from PVE::__construct()
and call it on first call of PVE::getCSRFPreventionToken()
, PVE::getTicket()
or PVE::getCookie()
kluvi commented
If you want, I can make PR for this issue.
MrKampf commented
Thanks, i push today a update for this.
MrKampf commented
Added