-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ssl pfx auth #38
base: main
Are you sure you want to change the base?
Add ssl pfx auth #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
);
|
||
export { Client, IOptions } from 'soap'; | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.