]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: client-common-auth - Move all direct (initial) auth client activity...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 10 Oct 2023 00:15:27 +0000 (02:15 +0200)
committerstephan.bosch <stephan.bosch@open-xchange.com>
Mon, 23 Oct 2023 15:50:54 +0000 (15:50 +0000)
This improves separation of concerns and clarity of the code.

src/login-common/client-common-auth.c
src/login-common/sasl-server.c
src/login-common/sasl-server.h

index 2b4ee707ba1c7ff2d879a4b0f1831728fba624e8..c3c0973f8c7febd76ad5c6cabac3fe6133387fc1 100644 (file)
@@ -815,7 +815,7 @@ void client_auth_respond(struct client *client, const char *response)
 
        client->auth_client_continue_pending = FALSE;
        client_set_auth_waiting(client);
-       auth_client_request_continue(client->auth_request, response);
+       sasl_server_auth_continue(client, response);
 }
 
 void client_auth_abort(struct client *client)
index 0415c539669461133aaf749421b104f8317e9d03..75b82036d4dd1d3883959682af084fe337eb8f4a 100644 (file)
@@ -603,6 +603,11 @@ sasl_server_auth_cancel(struct client *client, const char *reason,
        call_client_callback(client, reply, reason, NULL);
 }
 
+void sasl_server_auth_continue(struct client *client, const char *response)
+{
+       auth_client_request_continue(client->auth_request, response);
+}
+
 void sasl_server_auth_failed(struct client *client, const char *reason,
                             const char *code)
 {
index 704dde7b72614fa8494932621d92c000a49b7114..678e366c6fc69e9a78c4bf255937d1e1db3c4abe 100644 (file)
@@ -37,6 +37,7 @@ void sasl_server_auth_begin(struct client *client, const char *mech_name,
                            enum sasl_server_auth_flags flags,
                            const char *initial_resp_base64,
                            sasl_server_callback_t *callback);
+void sasl_server_auth_continue(struct client *client, const char *response);
 void sasl_server_auth_failed(struct client *client, const char *reason,
        const char *code) ATTR_NULL(3);
 /* Called when client asks for SASL authentication to be aborted by sending