@@ -20,6 +20,7 @@ use std::{
2020
2121use anyhow:: Context ;
2222use authentication:: {
23+ application_auth:: ApplicationAuth ,
2324 validate_id_token,
2425 Auth0IdToken ,
2526} ;
@@ -411,6 +412,7 @@ pub struct Application<RT: Runtime> {
411412 log_visibility : Arc < dyn LogVisibility < RT > > ,
412413 module_cache : ModuleCache < RT > ,
413414 system_env_var_names : HashSet < EnvVarName > ,
415+ app_auth : Arc < ApplicationAuth > ,
414416}
415417
416418impl < RT : Runtime > Clone for Application < RT > {
@@ -443,6 +445,7 @@ impl<RT: Runtime> Clone for Application<RT> {
443445 log_visibility : self . log_visibility . clone ( ) ,
444446 module_cache : self . module_cache . clone ( ) ,
445447 system_env_var_names : self . system_env_var_names . clone ( ) ,
448+ app_auth : self . app_auth . clone ( ) ,
446449 }
447450 }
448451}
@@ -472,6 +475,7 @@ impl<RT: Runtime> Application<RT> {
472475 log_visibility : Arc < dyn LogVisibility < RT > > ,
473476 snapshot_import_pause_client : PauseClient ,
474477 scheduled_jobs_pause_client : PauseClient ,
478+ app_auth : Arc < ApplicationAuth > ,
475479 ) -> anyhow:: Result < Self > {
476480 let module_cache =
477481 ModuleCache :: new ( runtime. clone ( ) , database. clone ( ) , modules_storage. clone ( ) ) . await ;
@@ -600,6 +604,7 @@ impl<RT: Runtime> Application<RT> {
600604 log_visibility,
601605 module_cache,
602606 system_env_var_names : system_env_vars. into_keys ( ) . collect ( ) ,
607+ app_auth,
603608 } )
604609 }
605610
@@ -718,6 +723,10 @@ impl<RT: Runtime> Application<RT> {
718723 self . database . latest_snapshot ( )
719724 }
720725
726+ pub fn app_auth ( & self ) -> Arc < ApplicationAuth > {
727+ self . app_auth . clone ( )
728+ }
729+
721730 pub async fn search_with_compiled_query (
722731 & self ,
723732 index_id : IndexId ,
0 commit comments