feat: HTTPSig authenticated fetch

This commit is contained in:
Aravinth Manivannan 2024-11-20 07:23:35 +05:30
parent 06d07983a5
commit ac567cd67d
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -199,6 +199,11 @@ impl Adapters {
pub async fn federation_config(pool: PgPool, settings: &settings::Settings) -> WebFederationConfig { pub async fn federation_config(pool: PgPool, settings: &settings::Settings) -> WebFederationConfig {
let adapters = Adapters::new(pool, settings); let adapters = Adapters::new(pool, settings);
let system_actor = adapters
.get_system_actor_service
.get_system_actor()
.await
.unwrap();
let mut data = Dependencies::default(); let mut data = Dependencies::default();
data.insert(adapters.out_db_get_person_adapter.clone()); data.insert(adapters.out_db_get_person_adapter.clone());
@ -231,6 +236,7 @@ pub async fn federation_config(pool: PgPool, settings: &settings::Settings) -> W
actix_web::web::Data::new( actix_web::web::Data::new(
activitypub_federation::config::FederationConfig::builder() activitypub_federation::config::FederationConfig::builder()
.domain(settings.server.domain.clone()) .domain(settings.server.domain.clone())
.signed_fetch_actor(&system_actor)
.client( .client(
crate::utils::ap_client::APClientBuilder::default() crate::utils::ap_client::APClientBuilder::default()
.user_agent(settings.server.domain.clone()) .user_agent(settings.server.domain.clone())