mirror of https://github.com/certd/certd
commit
bafccb20c6
|
@ -58,6 +58,16 @@ export class ProxmoxAccess extends BaseAccess {
|
||||||
encrypt: true,
|
encrypt: true,
|
||||||
})
|
})
|
||||||
password = '';
|
password = '';
|
||||||
|
|
||||||
|
@AccessInput({
|
||||||
|
title: '领域',
|
||||||
|
component: {
|
||||||
|
placeholder: 'realm',
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
encrypt: false,
|
||||||
|
})
|
||||||
|
realm = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
new ProxmoxAccess();
|
new ProxmoxAccess();
|
||||||
|
|
|
@ -95,7 +95,7 @@ export class ProxmoxUploadCert extends AbstractPlusTaskPlugin {
|
||||||
const access: ProxmoxAccess = await this.getAccess<ProxmoxAccess>(this.accessId);
|
const access: ProxmoxAccess = await this.getAccess<ProxmoxAccess>(this.accessId);
|
||||||
const pve = await import('@corsinvest/cv4pve-api-javascript');
|
const pve = await import('@corsinvest/cv4pve-api-javascript');
|
||||||
const client = new pve.PveClient(access.host, access.port);
|
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 || 'pam');
|
||||||
if (!login) {
|
if (!login) {
|
||||||
throw new Error(`Login failed:${JSON.stringify(login)}`);
|
throw new Error(`Login failed:${JSON.stringify(login)}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue