Skip to content

Commit

Permalink
Renamed SASL to sasl according to protocol definition for SASL plain … (
Browse files Browse the repository at this point in the history
jbmusso#97)

* Renamed SASL to sasl according to protocol definition for SASL plain text authentication. Now using Buffer object to create the UTF-8 byte encoding

* removing utf8 library dependency
  • Loading branch information
Patrick Filion authored and jbmusso committed Dec 18, 2017
1 parent 8675c99 commit e9c4594
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion gremlin-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"lodash": "^3.10.1",
"node-uuid": "^1.4.3",
"readable-stream": "^2.0.2",
"utf8": "^2.0.0",
"ws": "^2.3.1",
"zer": "^0.1.0"
},
Expand Down
4 changes: 2 additions & 2 deletions gremlin-client/src/GremlinClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import uuid from 'node-uuid';
import _ from 'lodash';
import highland from 'highland';
import { gremlin, renderChain } from 'zer';
import utf8 from 'utf8';

import WebSocketGremlinConnection from './WebSocketGremlinConnection';
import MessageStream from './MessageStream';
Expand Down Expand Up @@ -243,7 +242,8 @@ class GremlinClient extends EventEmitter {

buildChallengeResponse(requestId) {
const { processor, op, accept, language, aliases } = this.options;
var args = { SASL: utf8.encode('\0' + this.user + '\0' + this.password) };
var saslbase64 = new Buffer('\0' + this.user + '\0' + this.password).toString('base64');
var args = { sasl: saslbase64 }

const message = {
requestId: requestId,
Expand Down

0 comments on commit e9c4594

Please sign in to comment.