@@ -246,6 +246,7 @@ static const CHARSET_INFO *charset_info = &my_charset_latin1;
246
246
247
247
static char *opt_oci_config_file = nullptr ;
248
248
static char *opt_authentication_oci_client_config_profile = nullptr ;
249
+ static char *opt_authentication_openid_connect_client_id_token_file = nullptr ;
249
250
static char *opt_register_factor = nullptr ;
250
251
251
252
static bool opt_tel_plugin = false ;
@@ -2080,6 +2081,11 @@ static struct my_option my_long_options[] = {
2080
2081
" is ~/.oci/config and %HOME/.oci/config on Windows." ,
2081
2082
&opt_oci_config_file, &opt_oci_config_file, nullptr , GET_STR, REQUIRED_ARG,
2082
2083
0 , 0 , 0 , nullptr , 0 , nullptr },
2084
+ {" authentication-openid-connect-client-id-token-file" , 0 ,
2085
+ " Specifies the location of the ID token file." ,
2086
+ &opt_authentication_openid_connect_client_id_token_file,
2087
+ &opt_authentication_openid_connect_client_id_token_file, nullptr , GET_STR,
2088
+ REQUIRED_ARG, 0 , 0 , 0 , nullptr , 0 , nullptr },
2083
2089
{" telemetry-client" , 0 , " Load the telemetry_client plugin." ,
2084
2090
&opt_tel_plugin, &opt_tel_plugin, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 ,
2085
2091
nullptr , 0 , nullptr },
@@ -5197,6 +5203,29 @@ static bool init_connection_options(MYSQL *mysql) {
5197
5203
}
5198
5204
}
5199
5205
5206
+ /* set authentication_openid_connect_client ID token file option if required
5207
+ */
5208
+ if (opt_authentication_openid_connect_client_id_token_file != nullptr ) {
5209
+ struct st_mysql_client_plugin *openid_connect_plugin =
5210
+ mysql_client_find_plugin (mysql, " authentication_openid_connect_client" ,
5211
+ MYSQL_CLIENT_AUTHENTICATION_PLUGIN);
5212
+ if (!openid_connect_plugin) {
5213
+ put_info (" Cannot load the authentication_openid_connect_client plugin." ,
5214
+ INFO_ERROR);
5215
+ return true ;
5216
+ }
5217
+ if (mysql_plugin_options (
5218
+ openid_connect_plugin, " id-token-file" ,
5219
+ opt_authentication_openid_connect_client_id_token_file)) {
5220
+ put_info (
5221
+ " Failed to set id token file for "
5222
+ " authentication_openid_connect_client "
5223
+ " plugin." ,
5224
+ INFO_ERROR);
5225
+ return true ;
5226
+ }
5227
+ }
5228
+
5200
5229
char error[256 ]{0 };
5201
5230
#if defined(_WIN32)
5202
5231
if (set_authentication_kerberos_client_mode (mysql, error, 255 )) {
0 commit comments