]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Rename oauth2_username_format to oauth2_username_validation_format
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 27 Mar 2024 12:25:42 +0000 (14:25 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:12 +0000 (12:34 +0200)
src/auth/db-oauth2.c
src/auth/db-oauth2.h

index 2874354147c5621783b02a96b03261876c90e5fd..565852b02fdfb8d79adbc9c929b2d7838bc26d83 100644 (file)
@@ -29,7 +29,7 @@ static const struct setting_define auth_oauth2_setting_defines[] = {
        DEF(STR, introspection_url),
        DEF(BOOLLIST, scope),
        DEF(ENUM, introspection_mode),
-       DEF(STR_NOVARS, username_format),
+       DEF(STR_NOVARS, username_validation_format),
        DEF(STR, username_attribute),
        DEF(STR, active_attribute),
        DEF(STR, active_value),
@@ -53,7 +53,7 @@ static const struct auth_oauth2_settings auth_oauth2_default_settings = {
        .scope = ARRAY_INIT,
        .force_introspection = FALSE,
        .introspection_mode = ":auth:get:post:local",
-       .username_format = "%u",
+       .username_validation_format = "%u",
        .username_attribute = "email",
        .active_attribute = "",
        .active_value = "",
@@ -496,10 +496,10 @@ db_oauth2_validate_username(struct db_oauth2_request *req,
 
        string_t *username_val = t_str_new(strlen(username_value));
 
-       if (var_expand_with_table(username_val, req->db->set->username_format, table,
+       if (var_expand_with_table(username_val, req->db->set->username_validation_format, table,
                                  &error) <= 0) {
                *error_r = t_strdup_printf("var_expand(%s) failed: %s",
-                                       req->db->set->username_format, error);
+                                       req->db->set->username_validation_format, error);
                *result_r = PASSDB_RESULT_INTERNAL_FAILURE;
                return FALSE;
        } else if (strcmp(req->auth_request->fields.user, str_c(username_val)) != 0) {
index 59bb99246e0cfda93043f962e10b8acefe4323e4..36e1b62b1764521d67dfb8c3f61f6ead336e0b3a 100644 (file)
@@ -23,7 +23,7 @@ struct auth_oauth2_settings {
        */
        const char *introspection_mode;
        /* normalization var-expand template for username, defaults to %Lu */
-       const char *username_format;
+       const char *username_validation_format;
        /* name of username attribute to lookup, mandatory */
        const char *username_attribute;
        /* name of account is active attribute, optional */