Open codepope opened 7 years ago
Thanks for catching this. I'll try to post a fix this weekend.
Hi @jbmusso , we are also having the same problem and the suggested change by @codepope works :) . I'm asking politely if you are currently working on it or is this something we could help by doing the PR. Thanks
Looks like this can be closed! Which also means #90 can be closed!
Fix https://github.com/jbmusso/gremlin-javascript/commit/e9c45943371a788b0de5c53ac1d4d3199e4cceae merged on Dec 18, 2017
When the BuildChallengeResponse is triggered it sets the SASL key as "SASL":
https://github.com/jbmusso/gremlin-javascript/blob/master/gremlin-client/src/GremlinClient.js#L246
But, examining the Tinkerpop server side, it is looking for the key in lower case "sasl". The difference means the server sees an authentication challenge response with no parameters and returns a 401 Unauthenticated.
I suggest changing the line into:
Which also does a base64 encoding of the parameters to make them more resilient to string processing and encoding.