为proxmox登录添加领域字段

pull/413/head
yajiedesign 2025-06-05 13:39:10 +08:00
parent 9d10c45dac
commit fba7afc4e9
2 changed files with 11 additions and 1 deletions

View File

@ -58,6 +58,16 @@ export class ProxmoxAccess extends BaseAccess {
encrypt: true,
})
password = '';
@AccessInput({
title: '领域',
component: {
placeholder: 'realm',
},
required: true,
encrypt: true,
})
realm = '';
}
new ProxmoxAccess();

View File

@ -95,7 +95,7 @@ export class ProxmoxUploadCert extends AbstractPlusTaskPlugin {
const access: ProxmoxAccess = await this.getAccess<ProxmoxAccess>(this.accessId);
const pve = await import('@corsinvest/cv4pve-api-javascript');
const client = new pve.PveClient(access.host, access.port);
const login = await client.login(access.username, access.password, 'pam');
const login = await client.login(access.username, access.password, access.realm);
if (!login) {
throw new Error(`Login failed:${JSON.stringify(login)}`);
}