"Can't login" error on multiple connections to same or different servers
Shade634 opened this issue · 4 comments
Describe the bug
Once the pve is set once, it returns a "can't login" on every new connection.
It seems to keep a session somehow but i dont seem to be able to find an option to unset this.
Unsetting the connection var also does not seem to work.
To Reproduce
$credentials = [
'hostname' => $proxmoxConfig->getDomain(),
'username' => $proxmoxConfig->getUser(),
'password' => $proxmoxConfig->getPassword(true),
'authType' => 'pam',
'port' => $proxmoxConfig->getPort(),
];
$api = new pve($credentials);
//some other code
// api works fine
// Even an unset ($api) does not work
$credentials = [
'hostname' => $proxmoxConfig->getDomain(),
'username' => $proxmoxConfig->getUser(),
'password' => $proxmoxConfig->getPassword(true),
'authType' => 'pam',
'port' => $proxmoxConfig->getPort(),
];
$api = new pve($credentials);
// cant login
it happens to me with a different node that i try to connect to, or when i try to connect to the same node twice, on different levels in my code.
Expected behavior
A new fresh connection, anything else than a "Can't login" message
Even a disconnect function would work.
Have you the newst version? and have you debugged whether he gets the right login data?
its in this case the same server, so the credentials dont change between the frist and 2nd call. The first time it authenticates, the 2nd it does not.
Current version in composer: "mrkampf/proxmox-ve": "^0.2.6"
$credentials = [
'hostname' => $proxmoxConfig->getDomain(),
'username' => $proxmoxConfig->getUser(),
'password' => $proxmoxConfig->getPassword(true),
'authType' => 'pam',
'port' => $proxmoxConfig->getPort(),
];
$api = new pve($credentials);
//works
$api2 = new pve($credentials);
//errors "cant login"
Multi Login planed for next big update, this come middle of February
Now it's fixied with the new update