Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Minor updates to SASL::Authenticators API #184

Merged
merged 6 commits into from
Sep 29, 2023

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Sep 29, 2023

Making some minor API changes to SASL::Authenticators. This class hasn't been included in a release yet, so there's no need to deprecate anything... if the change is made before the release. :)

Since they haven't been in any release yet, `SASL.initial_response?` and
`SASL.done?` have been removed without deprecation.  The logic has been
moved directly into `Net::IMAP#authenticate` (for now).

Implementing `#initial_response?` is still optional.  But, to simplify
the tests, `#initial_response? => false` was added to all of the
deprecated SASL mechanisms.
Reversed the `use_defaults` default, and added another option for
`use_deprecated`.
Abstracts running a command with a continuation handler.

In the base specifications (both RFC-3501 and RFC-9051), the only
command to need this is `AUTHENTICATE`.  The only other continuations
are for sending literals, which are simple command arguments.  Are there
any IMAP extensions that use continuations in this way?

Even with only one command, this still makes that code a little more
readable.  More importantly, it also simplifies the creation of a
generic SASL protocol adapter, for use by `net-sasl`, `net-pop`, and
others.
@nevans nevans merged commit cb52a2d into master Sep 29, 2023
22 checks passed
@nevans nevans deleted the sasl/prerelease-api-changes branch September 29, 2023 14:14
@nevans nevans added the SASL 🔒 Authentication and authentication mechanisms label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SASL 🔒 Authentication and authentication mechanisms
Development

Successfully merging this pull request may close these issues.

1 participant