Skip to content

Conversation

@lukediamond
Copy link
Contributor

@lukediamond lukediamond commented May 25, 2021

Connecting to a server which provided X-OAUTH2 and PLAIN as SASL mechanisms, X-OAUTH2 was selected despite no token being provided. Now multiple candidate sets of required credentials are tested per mechanism (such as username/password, username/saltedPassword, userKey/clientKey all matching for SCRAM-SHA-1).

All tests pass, including a two more for a separate X-OAUTH2 mechanism.
X-OAUTH2 will now only be selected if a token credential is provided; password will no longer be used in its place.

return {
optional: ['authzid'],
required: ['username', 'password']
required: [['username', 'password']]
Copy link

@benbucksch benbucksch Mar 18, 2025

Choose a reason for hiding this comment

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

Why is this change necessary? PLAIN has username + password, and OAuth2 has username + access token.

This would be a fairly small and targeted code change, if it wasn't for this API change.

(Thanks for implementing this!)

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