From e9ed2e1421d3986f776500c87a636ae4d190a8d9 Mon Sep 17 00:00:00 2001 From: Iris Diana Yu Date: Wed, 8 May 2024 15:55:42 +0100 Subject: [PATCH] Add solr auth --- bin/export_atlas_ebeye_xml.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/export_atlas_ebeye_xml.pl b/bin/export_atlas_ebeye_xml.pl index 16024c8..b66392c 100755 --- a/bin/export_atlas_ebeye_xml.pl +++ b/bin/export_atlas_ebeye_xml.pl @@ -74,6 +74,8 @@ sub check_env_var { check_env_var('BIOENTITY_PROPERTIES_WBPS',"\$ATLAS_PROD/bioentity_properties/annotations/wbps"); check_env_var('SOLR_HOST',"should include both host and port if needed."); check_env_var('WEB_API_URL',"should include api url."); +check_env_var('SOLR_USER'); +check_env_var('SOLR_PASS'); my $atlasProdDir = $ENV{ "ATLAS_PROD" }; my $bioentity_properties_annotations_ensembl=$ENV{'BIOENTITY_PROPERTIES_ENSEMBL'}; @@ -207,6 +209,11 @@ sub get_data_from_solr_db { return ($H_geneIDs2expts2contrasts, $H_geneIDs2expts2assayGroups); } +sub LWP::UserAgent::get_basic_credentials { + my ($self, $realm, $url, $isproxy) = @_; + + return $ENV{'SOLR_USER'}, $ENV{'SOLR_PASS'}; +} ## parse json formatted result for genes associated to experiments accessions and assay group ids. sub parse_json_from_solr {