diff --git a/src/@awesome-cordova-plugins/plugins/http/index.ts b/src/@awesome-cordova-plugins/plugins/http/index.ts index e0e3cc38ec..dc9bc48004 100644 --- a/src/@awesome-cordova-plugins/plugins/http/index.ts +++ b/src/@awesome-cordova-plugins/plugins/http/index.ts @@ -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 { + return; + } + /** * Make a POST request *