@@ -83,8 +83,9 @@ type Result<T, E = Error> = std::result::Result<T, E>;
8383#[ serde( rename_all = "camelCase" ) ]
8484pub struct AirflowClientAuthenticationDetails {
8585 #[ serde( flatten) ]
86- pub common :
87- auth_core:: v1alpha1:: ClientAuthenticationDetails < oidc:: v1alpha1:: ClientAuthenticationMethodOption > ,
86+ pub common : auth_core:: v1alpha1:: ClientAuthenticationDetails <
87+ oidc:: v1alpha1:: ClientAuthenticationMethodOption ,
88+ > ,
8889
8990 /// Allow users who are not already in the FAB DB.
9091 /// Gets mapped to `AUTH_USER_REGISTRATION`
@@ -133,7 +134,9 @@ pub enum AirflowAuthenticationClassResolved {
133134 } ,
134135 Oidc {
135136 provider : oidc:: v1alpha1:: AuthenticationProvider ,
136- oidc : oidc:: v1alpha1:: ClientAuthenticationOptions < oidc:: v1alpha1:: ClientAuthenticationMethodOption > ,
137+ oidc : oidc:: v1alpha1:: ClientAuthenticationOptions <
138+ oidc:: v1alpha1:: ClientAuthenticationMethodOption ,
139+ > ,
137140 } ,
138141}
139142
@@ -143,15 +146,19 @@ impl AirflowClientAuthenticationDetailsResolved {
143146 client : & Client ,
144147 ) -> Result < AirflowClientAuthenticationDetailsResolved > {
145148 let resolve_auth_class =
146- |auth_details : auth_core:: v1alpha1:: ClientAuthenticationDetails < oidc :: v1alpha1 :: ClientAuthenticationMethodOption > | async move {
147- auth_details . resolve_class ( client ) . await
148- } ;
149+ |auth_details : auth_core:: v1alpha1:: ClientAuthenticationDetails <
150+ oidc :: v1alpha1 :: ClientAuthenticationMethodOption ,
151+ > | async move { auth_details . resolve_class ( client ) . await } ;
149152 AirflowClientAuthenticationDetailsResolved :: resolve ( auth_details, resolve_auth_class) . await
150153 }
151154
152155 pub async fn resolve < R > (
153156 auth_details : & [ AirflowClientAuthenticationDetails ] ,
154- resolve_auth_class : impl Fn ( auth_core:: v1alpha1:: ClientAuthenticationDetails < oidc:: v1alpha1:: ClientAuthenticationMethodOption > ) -> R ,
157+ resolve_auth_class : impl Fn (
158+ auth_core:: v1alpha1:: ClientAuthenticationDetails <
159+ oidc:: v1alpha1:: ClientAuthenticationMethodOption ,
160+ > ,
161+ ) -> R ,
155162 ) -> Result < AirflowClientAuthenticationDetailsResolved >
156163 where
157164 R : Future <
@@ -473,9 +480,10 @@ mod tests {
473480 oidc: oidc:: v1alpha1:: ClientAuthenticationOptions {
474481 client_credentials_secret_ref: "airflow-oidc-client1" . into( ) ,
475482 extra_scopes: vec![ "groups" . into( ) ] ,
476- product_specific_fields: oidc:: v1alpha1:: ClientAuthenticationMethodOption {
477- client_authentication_method: Default :: default ( ) ,
478- }
483+ product_specific_fields:
484+ oidc:: v1alpha1:: ClientAuthenticationMethodOption {
485+ client_authentication_method: Default :: default ( ) ,
486+ }
479487 }
480488 } ,
481489 AirflowAuthenticationClassResolved :: Oidc {
@@ -491,9 +499,10 @@ mod tests {
491499 oidc: oidc:: v1alpha1:: ClientAuthenticationOptions {
492500 client_credentials_secret_ref: "airflow-oidc-client2" . into( ) ,
493501 extra_scopes: Vec :: new( ) ,
494- product_specific_fields: oidc:: v1alpha1:: ClientAuthenticationMethodOption {
495- client_authentication_method: Default :: default ( ) ,
496- }
502+ product_specific_fields:
503+ oidc:: v1alpha1:: ClientAuthenticationMethodOption {
504+ client_authentication_method: Default :: default ( ) ,
505+ }
497506 }
498507 }
499508 ] ,
@@ -929,10 +938,13 @@ mod tests {
929938 /// Use this function in the tests to replace
930939 /// `stackable_operator::commons::authentication::ClientAuthenticationDetails`
931940 /// which requires a Kubernetes client.
941+ #[ allow( clippy:: type_complexity) ]
932942 fn create_auth_class_resolver (
933943 auth_classes : Vec < auth_core:: v1alpha1:: AuthenticationClass > ,
934944 ) -> impl Fn (
935- auth_core:: v1alpha1:: ClientAuthenticationDetails < oidc:: v1alpha1:: ClientAuthenticationMethodOption > ,
945+ auth_core:: v1alpha1:: ClientAuthenticationDetails <
946+ oidc:: v1alpha1:: ClientAuthenticationMethodOption ,
947+ > ,
936948 ) -> Pin <
937949 Box <
938950 dyn Future <
@@ -943,7 +955,9 @@ mod tests {
943955 > ,
944956 > ,
945957 > {
946- move |auth_details : auth_core:: v1alpha1:: ClientAuthenticationDetails < oidc:: v1alpha1:: ClientAuthenticationMethodOption > | {
958+ move |auth_details : auth_core:: v1alpha1:: ClientAuthenticationDetails <
959+ oidc:: v1alpha1:: ClientAuthenticationMethodOption ,
960+ > | {
947961 let auth_classes = auth_classes. clone ( ) ;
948962 Box :: pin ( async move {
949963 auth_classes
0 commit comments