Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TrustedCertificateService

Hierarchy

Index

Constructors

constructor

Methods

create

  • Parameters

    Returns 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);
     })();
    

delete

  • Parameters

    Returns Object

    Response wrapped in IResult

detail

  • Parameters

    Returns Object

    Response wrapped in IResult

    Example

    
       const fingerprint: string = 'abc';
    
       (async () => {
         const {data, res} = await trustedCertificateService.detail(fingerprint);
      })();
    

list

  • list(filter?: object): Object
  • Parameters

    • Default value filter: object = {}

    Returns Object

    Response wrapped in IResultList.

    Example

    
      (async () => {
        const {data, res} = await trustedCertificateService.list();
      })();
    

regeneratePoPVerificationCode

  • Parameters

    Returns Promise<IResult<ITrustedCertificate>>

    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;
     })();
    

update

  • Parameters

    Returns Object

    Response wrapped in IResult

    Example

    
     const certificate: Partial<ITrustedCertificate> = {
       name: 'Name'
     };
    
     (async () => {
       const {data, res} = await trustedCertificateService.update(certificate);
     })();
    

verifySignedVerificationCode

  • Parameters

    Returns Promise<IResult<ITrustedCertificate>>

    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;
     })();
    

Generated using TypeDoc