Conversation
lehh
left a comment
There was a problem hiding this comment.
Hello @SharonFabin. Thanks for the PR! Also thanks for it to be based on the NTLM PR.
I've left a couple comments and I also ask you to add tests in the soap.service.spec.ts like this as an example
| export type SSLPFXOptions = { | ||
| pfx: string | Buffer; | ||
| passphrase?: string; | ||
| defaults?: any; |
There was a problem hiding this comment.
What do you think about typing this AgentOptions from the https module?
| passphrase: SSLPFXOptions.passphrase, | ||
| ...SSLPFXOptions.defaults, | ||
| }; | ||
| return new ClientSSLSecurityPFX(loginData); |
There was a problem hiding this comment.
Are you sure this is working? The ClientSSLSecurityPFX expects two or three args in the constructor and it's receiving only one. The typescript is not warning because the loginData is of any type and then it gets confused 🤷🏻.
I believe it would be better to do something like:
return new ClientSSLSecurityPFX(
SSLPFXOptions.pfx,
SSLPFXOptions.passphrase,
SSLPFXOptions.defaults
);| interface Auth { | ||
| type: typeof BASIC_AUTH | typeof WSSECURITY_AUTH; | ||
| type: typeof BASIC_AUTH | typeof WSSECURITY_AUTH | typeof SSL_PFX_AUTH; | ||
| username: string; |
There was a problem hiding this comment.
I believe the username and password should be turned into optional now, since it seems the SSL PFX doesn't require them.
No description provided.