Skip to content

Commit d3c92c7

Browse files
authored
Merge pull request #116 from ctria/sasl_authcookie
Allow the usage of the AUTHCOOKIE mechanism for SASL
2 parents baf677b + 6fbb654 commit d3c92c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/commands/handlers/registration.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ var handlers = {
145145
}
146146
if (this.network.cap.enabled.length > 0) {
147147
if (this.network.cap.isEnabled('sasl')) {
148-
this.connection.write('AUTHENTICATE PLAIN');
148+
if (this.connection.options.sasl_mechanism === 'AUTHCOOKIE') {
149+
this.connection.write('AUTHENTICATE AUTHCOOKIE');
150+
} else {
151+
this.connection.write('AUTHENTICATE PLAIN');
152+
}
149153
} else {
150154
this.connection.write('CAP END');
151155
this.network.cap.negotiating = false;

0 commit comments

Comments
 (0)