Azure / go-ntlmssp

NTLM/Negotiate authentication over HTTP
MIT License
189 stars 70 forks source link

add version, domain and workstation fields #13

Closed justdan96 closed 6 years ago

justdan96 commented 6 years ago

Add version support from jh125486 Add workstation and domain support from jh125486 Enable to extract domain from username

Contributing pull request. Most of the heavy lifting was done by jh125486, I just added a few lines to read the domain from the username. This is required so our team can use domain credentials for logon in masterzen/winrm.

msftclas commented 6 years ago

CLA assistant check
All CLA requirements met.

boumenot commented 6 years ago

/cc @paulmey

paulmey commented 6 years ago

can we have some tests for the new functionality?

justdan96 commented 6 years ago

I wasn't sure exactly what to add for the testing so hopefully what I've done is okay. SplitN is in there as well, I ended up creating a new func for parsing the username to make things simpler. I might look at checking if the username is valid and putting it into the same function, if I can find a decent spec for what is considered a valid username.

paulmey commented 6 years ago

This way, we at least have some tests fail if the structure of the message changes.

justdan96 commented 6 years ago

Thanks!