mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
soap.d.ts: ClientSSLSecurty constructor parameters (#13216)
This commit is contained in:
5
soap/index.d.ts
vendored
5
soap/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for soap
|
||||
// Project: https://www.npmjs.com/package/soap
|
||||
// Definitions by: Nicole Wang <https://github.com/nicoleWjie>, Cage Fox <https://github.com/cagefox>
|
||||
// Definitions by: Leo Liang <https://github.com/aleung>, Cage Fox <https://github.com/cagefox>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -15,7 +15,8 @@ export class WSSecurity implements Security {
|
||||
}
|
||||
|
||||
export class ClientSSLSecurity implements Security {
|
||||
constructor(key: string, cert: string, ca: string, defaults: any);
|
||||
constructor(key: Buffer | string, cert: Buffer | string, ca: Buffer | string, defaults?: any);
|
||||
constructor(key: Buffer | string, cert: Buffer | string, defaults?: any);
|
||||
}
|
||||
|
||||
interface Client extends events.EventEmitter {
|
||||
|
||||
@@ -11,7 +11,9 @@ soap.createClient(url, wsdlOptions, function(err: any, client: soap.Client) {
|
||||
let securityOptions = { hasTimeStamp: false };
|
||||
client.setSecurity(new soap.WSSecurity('user', 'password', securityOptions));
|
||||
let defaults = {rejectUnauthorized: false};
|
||||
client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', '/path/to/ca',defaults));
|
||||
client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', '/path/to/ca', defaults));
|
||||
client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', defaults));
|
||||
client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', '/path/to/ca'));
|
||||
client.addSoapHeader({});
|
||||
client.setEndpoint('http://localhost');
|
||||
client['create']({ name: 'value' }, function(err, result) {
|
||||
|
||||
Reference in New Issue
Block a user