public static function addIdpLogoUrls(
        &$sources, 
        $authSourcesConfig, 
        $metadataPath
    ) {     
        
        $idpMetadata = Metadata::getIdpMetadataEntries($metadataPath);
        $idpEntries = self::getIdpsFromAuthSources($authSourcesConfig);      

        foreach ($sources as &$source) {
            $idpLabel = $source['source'];
            $idpEntityId = $idpEntries[$idpLabel];    
            
            // If there is no entry for the idp in saml20-idp-remote.php, skip it
            if ( ! isset($idpMetadata[$idpEntityId])) {
                continue;
            }
            $idpMdEntry = $idpMetadata[$idpEntityId];
            
            // If there is no logo URL entry in the metadata, skip it
            if ( ! isset($idpMdEntry[Utils::IDP_LOGO_KEY])) {
                continue;
            }        

            $logoURL = $idpMdEntry[Utils::IDP_LOGO_KEY];
            
            // sanitize the url (remove bad characters and just return false if it's not a string)
            $logoURL = filter_var($logoURL, FILTER_SANITIZE_URL);
            $source[Utils::IDP_LOGO_KEY] = $logoURL;
        }  
    }