@@ -135,7 +135,7 @@ pub mod versioned {
135135 Clone , Debug , Deserialize , Eq , Hash , JsonSchema , Ord , PartialEq , PartialOrd , Serialize ,
136136 ) ]
137137 #[ serde( rename_all = "camelCase" ) ]
138- pub struct ClientAuthenticationOptions < T = ( ) > {
138+ pub struct ClientAuthenticationOptions < ProductSpecificClientAuthenticationOptions = ( ) > {
139139 /// A reference to the OIDC client credentials secret. The secret contains
140140 /// the client id and secret.
141141 #[ serde( rename = "clientCredentialsSecret" ) ]
@@ -151,6 +151,20 @@ pub mod versioned {
151151 #[ serde( default ) ]
152152 pub extra_scopes : Vec < String > ,
153153
154+ /// If desired, operators can add custom fields that are only needed for this specific product.
155+ /// They need to create a struct holding them and pass that as `ProductSpecific`.
156+ ///
157+ /// In case you only need the `clientAuthenticationMethod` field, you can use
158+ /// [`ClientAuthenticationMethodOption`] directly.
159+ #[ serde( flatten) ]
160+ pub product_specific_fields : ProductSpecificClientAuthenticationOptions ,
161+ }
162+
163+ #[ derive(
164+ Clone , Debug , Deserialize , Eq , Hash , JsonSchema , Ord , PartialEq , PartialOrd , Serialize ,
165+ ) ]
166+ #[ serde( rename_all = "camelCase" ) ]
167+ pub struct ClientAuthenticationMethodOption {
154168 /// The OAuth2 client authentication method to use for token endpoint requests.
155169 /// Defaults to [`ClientAuthenticationMethod::ClientSecretBasic`].
156170 ///
@@ -169,10 +183,5 @@ pub mod versioned {
169183 ) ]
170184 #[ serde( default ) ]
171185 pub client_authentication_method : ClientAuthenticationMethod ,
172-
173- // If desired, operators can add custom fields that are only needed for this specific product.
174- // They need to create a struct holding them and pass that as `T`.
175- #[ serde( flatten) ]
176- pub product_specific_fields : T ,
177186 }
178187}
0 commit comments