Skip to content

Conversation

@emersonveenstra
Copy link

This enables bots to have separate fields for SASL authentication,
instead of using username/password for two different things.

Signed off by Emerson Veenstra git@emersonveenstra.net

This enables bots to have separate fields for SASL authentication,
instead of using username/password for two different things.

Signed off by Emerson Veenstra <git@emersonveenstra.net>
Copy link

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feature to have, just a few nits. Would be good to get a changelog item since we're being grown up and using those now.

sasl?: boolean;
saslType?: 'PLAIN'|'EXTERNAL';
saslUsername?: string|null;
saslPassword?: string|null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think this is great, but I'd actually turn sasl into an object and make it include the type,username and password as keys. Just to make this a bit less messy. It's a breaking change, but worthwhile I feel.

if (message.args[0] !== '+') {
return;
}
if (!this.opt.saslUsername || !this.opt.saslPassword) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I worry this might be a silent error. If we've missed the username or password but expect to use SASL, that feels like a fail. Perhaps we should add this check to the PLAIN case statement and throw?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants