Skip to content

Commit

Permalink
Merge pull request #116 from ctria/sasl_authcookie
Browse files Browse the repository at this point in the history
Allow the usage of the AUTHCOOKIE mechanism for SASL
  • Loading branch information
prawnsalad authored Nov 30, 2017
2 parents baf677b + 6fbb654 commit d3c92c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/handlers/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ var handlers = {
}
if (this.network.cap.enabled.length > 0) {
if (this.network.cap.isEnabled('sasl')) {
this.connection.write('AUTHENTICATE PLAIN');
if (this.connection.options.sasl_mechanism === 'AUTHCOOKIE') {
this.connection.write('AUTHENTICATE AUTHCOOKIE');
} else {
this.connection.write('AUTHENTICATE PLAIN');
}
} else {
this.connection.write('CAP END');
this.network.cap.negotiating = false;
Expand Down

0 comments on commit d3c92c7

Please sign in to comment.