Optional
realtime: RealtimeCreates a new trusted certificate.
Trusted certificate object.
Response wrapped in [[IResult]]
Example
const certificate: Partial<ITrustedCertificate> = {
name: 'Name',
certInPemFormat: 'MIID+DCCAuCgAwIBAgIJAO1Q9t/M9gYlMA0GC...',
status: 'ENABLED'
};
(async () => {
const {data, res} = await trustedCertificateService.create(certificate);
})();
Removes a trusted certificate with given fingerprint.
Trusted certificate object or trusted certificate fingerprint.
Example
const fingerprint: string = 'abc';
(async () => {
const {data, res} = await trustedCertificateService.delete(fingerprint);
})();
Response wrapped in [[IResult]]
Gets the details of trusted certificate
Trusted certificate object or trusted certificate fingerprint.
Response wrapped in [[IResult]]
Example
const fingerprint: string = 'abc';
(async () => {
const {data, res} = await trustedCertificateService.detail(fingerprint);
})();
Gets a list of trusted certificates.
Response wrapped in [[IResultList]].
Example
(async () => {
const {data, res} = await trustedCertificateService.list();
})();
Regenerates unsigned verification code for trusted certificate.
Trusted certificate object or finger print.
Certificate object with new verification code (wrapped in [[IResult]])
Example
(async () => {
const fingerPrint = '00a360973e3e8d61e05aedb32c72438e2442279e';
const {data, res} = await trustedCertificateService.regeneratePoPVerificationCode(fingerPrint);
const newProofOfPossessionUnsignedVerificationCode = data.proofOfPossessionUnsignedVerificationCode;
})();
Updates trusted certificate data.
Trusted certificate partial object.
Response wrapped in [[IResult]]
Example
const certificate: Partial<ITrustedCertificate> = {
name: 'Name'
};
(async () => {
const {data, res} = await trustedCertificateService.update(certificate);
})();
Verifies signed verification code for trusted certificate.
Trusted certificate object or finger print.
Unsigned verification code encrypted by the private key.
Certificate object with the result of verification (wrapped in [[IResult]]).
Example
(async () => {
const fingerPrint = '00a360973e3e8d61e05aedb32c72438e2442279e';
const encryptedVerificationCode ='fuvlVWLfXG3V3bJWAdEhPD0HFCrYo5';
const {data, res} = await trustedCertificateService.verifySignedVerificationCode(fingerPrint, encryptedVerificationCode);
const isCertificateVerified = data.proofOfPossessionValid;
})();
This class allows for managing trusted certificates.