Skip to content

Commit

Permalink
feat(http): add set client auth mode method (#4100)
Browse files Browse the repository at this point in the history
Co-authored-by: Johann SERVOIRE <[email protected]>
  • Loading branch information
Johann-S and Johann SERVOIRE authored Apr 2, 2022
1 parent 07093dc commit 04fdacc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/@awesome-cordova-plugins/plugins/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,26 @@ export class HTTP extends AwesomeCordovaNativePlugin {
return;
}

/**
* Configure X.509 client certificate authentication. Takes mode and options. mode being one of following values:
* none: disable client certificate authentication
* systemstore (only on Android): use client certificate installed in the Android system store; user will be presented with a list of all installed certificates
* buffer: use given client certificate; you will need to provide an options object
*
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setclientauthmode
* @param {string} mode auth mode
* @param {object} options useful for buffer mode
* @param {ArrayBuffer} options.rawPkcs ArrayBuffer containing raw PKCS12 container with client certificate and private key
* @param {string} options.pkcsPassword password of the PKCS container
*/
@Cordova()
setClientAuthMode(
mode: 'none' | 'systemstore ' | 'buffer',
options?: { rawPkcs: ArrayBuffer; pkcsPassword: string }
): Promise<void> {
return;
}

/**
* Make a POST request
*
Expand Down

0 comments on commit 04fdacc

Please sign in to comment.