write: (
username: any,
record: any,
opts: any,
) =>
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written?: undefined;
}
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written: any[];
}
| {
errorCode?: undefined;
errors: any[];
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
written: any[];
} = write
Type Declaration
-
- (
username: any,
record: any,
opts: any,
):
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written?: undefined;
}
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written: any[];
}
| {
errorCode?: undefined;
errors: any[];
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
written: any[];
}
-
Parameters
- username: any
- record: any
- opts: any
Returns
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written?: undefined;
}
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written: any[];
}
| {
errorCode?: undefined;
errors: any[];
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
written: any[];
}
{ ok, written, key, errors }, with errorCode on a refusal
Adds an issued or uploaded key pair to a person's entry, every value or a failure naming which one.
The private key is sealed and written first; a key pair that fails to seal or write is lost, since this service keeps no copy. Refused at the cap (
pki.personSigningKeyMax, STS-PKI-0223) and for a label that is not a short name (STS-PKI-0225). A CAEP credential-change event follows a successful write.