]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: db-oauth2 - Add token field to fields
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 16 Jan 2026 08:27:27 +0000 (10:27 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 19 Jan 2026 14:48:38 +0000 (14:48 +0000)
src/auth/db-oauth2.c

index 5aa9d0d387dda736fb4a4c20a2ffdb214697491a..9ab64486e0e57c58de805c64b6dd7213a1d6f926 100644 (file)
@@ -388,8 +388,14 @@ db_oauth2_add_extra_fields(struct db_oauth2_request *req, const char **error_r)
                { "oauth2", db_oauth2_var_expand_func_oauth2 },
                { NULL, NULL }
        };
+       /* include token */
+       unsigned int count = 1;
+       struct var_expand_table *table =
+               auth_request_get_var_expand_table_full(req->auth_request, req->username, &count);
+       table[0].key = "token";
+       table[0].value = req->token;
        struct var_expand_params params = {
-               .table = auth_request_get_var_expand_table(req->auth_request),
+               .table = table,
                .providers = func_table,
                .context = req,
        };