Support delayed auth with extended authorization #3387
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support MOSQ_ERR_AUTH_DELAYED for extended auth.
Added
mosquitto_complete_extended_auth, which optionally sends auth data. Sadly, there's a bit of code duplication between this andhandle__auth. I wasn't sure if it was worth splitting out into a shared segment of code or not.Added two client states,
mosq_cs_delayed_ext_authandmosq_cs_delayed_ext_reauth. This seemed to be cleaner than trying to use existing client states.Updated the
delayed_authplugin example to support extended auth.I commandeered
contexts_by_id_delayed_autha bit. My understanding is that previously, that table was disjoint withcontexts_by_id, but that won't work well for reauthentication. Since the same hash handle can't be used for more than one table, I added a new handle.Maintainers, feel free to modify/discard any portion of this changeset as necessary.
make testwith your changes locally?Fixes #3357