constructor()

in src/rsa_key_pair_credential.ts [15:34]


  constructor(publicKeyId: string, privateKeyFile: string) {
    if (!publicKeyId) {
      throw new Error('Missing required publicKeyId option in config for rsa_key_pair');
    }

    if (!privateKeyFile) {
      throw new Error('Missing required privateKeyFile option in config for rsa_key_pair');
    }

    if (!fs.existsSync(privateKeyFile)) {
      throw new Error(`privateKeyFile ${privateKeyFile} cannot be empty`);
    }

    const conf = new Config({
      type: 'rsa_key_pair'
    });
    super(conf);
    this.privateKey = utils.parseFile(privateKeyFile);
    this.publicKeyId = publicKeyId;
  }