From: Aki Tuomi Date: Wed, 27 Mar 2024 12:25:42 +0000 (+0200) Subject: auth: Rename oauth2_username_format to oauth2_username_validation_format X-Git-Tag: 2.4.1~877 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7cad0ed77d3e9d18e6efc28d7ed3c9519a563a0;p=thirdparty%2Fdovecot%2Fcore.git auth: Rename oauth2_username_format to oauth2_username_validation_format --- diff --git a/src/auth/db-oauth2.c b/src/auth/db-oauth2.c index 2874354147..565852b02f 100644 --- a/src/auth/db-oauth2.c +++ b/src/auth/db-oauth2.c @@ -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) { diff --git a/src/auth/db-oauth2.h b/src/auth/db-oauth2.h index 59bb99246e..36e1b62b17 100644 --- a/src/auth/db-oauth2.h +++ b/src/auth/db-oauth2.h @@ -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 */