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

Forward authenticate keyword arguments #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nevans
Copy link
Contributor

@nevans nevans commented Nov 7, 2023

  • .start and #start now take an auth keyword argument, which is an optional hash of keyword arguments that will be forwarded to #authenticate.
  • #authenticate now forwards its keyword arguments (and its block argument) to its chosen authenticator.

Note: this isn't tested in this PR because the tests I originally wrote for it don't work without authenticators that accept keyword arguments. This PR doesn't update existing authenticators or adding any new authenticator. See #71.

@nevans
Copy link
Contributor Author

nevans commented Nov 7, 2023

@tmtm Thanks for taking the time to review all of my PRs! I've split this PR out from #71, because the other changes in that PR are not as important or uncontroversial as these changes. However, the tests for this code are still in that PR. Please let me know if you'd like me to make any changes (e.g: adding tests directly to this PR or changing anything about the API). Thanks!

This adds a new `auth` keyword param to `Net::SMTP.start` and `#start`
that can be used to pass any arbitrary keyword parameters to
`#authenticate`.  The pre-existing `username`, `secret`, etc keyword
params will retain their existing behavior as positional arguments to
`#authenticate`.
@nevans nevans force-pushed the sasl/forward-keyword-args branch from d229999 to 7a6f2f1 Compare May 5, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant