diff --git a/config/vufind/EDS.ini b/config/vufind/EDS.ini index 45b71bc39353c7b4af17fcc82b39191b6cd97927..68ff5de78faf0d0b2924a768a6bb7fb1f12f963c 100644 --- a/config/vufind/EDS.ini +++ b/config/vufind/EDS.ini @@ -48,6 +48,12 @@ timeout = 120 ; limits that do not affect the POST-based API. search_http_method = POST +; This is the URL of the EDS API endpoint: +api_url = "https://eds-api.ebscohost.com/edsapi/rest" + +; This is the URL of the EBSCO authorization endpoint: +auth_url = "https://eds-api.ebscohost.com/authservice/rest" + ; The following two sections can be used to associate specific recommendations ; modules with specific search types defined in the [Basic_Searches] section ; below. For all the details on how these sections work, see the comments above diff --git a/config/vufind/EIT.ini b/config/vufind/EIT.ini index a7226ae04a9353de960cd9f7cfca4dfe2f930f01..f3d1c69038d12c2575ff24ef805fbdfb4ef03301 100644 --- a/config/vufind/EIT.ini +++ b/config/vufind/EIT.ini @@ -1,7 +1,7 @@ ; This section contains global settings affecting search behavior. [General] ; EBSCO offers searching via the EBSCOhost API. See the API -; documentation (http://support.ebsco.com/eit/ws.php) for more information. +; documentation (https://support.ebsco.com/eit/ws.php) for more information. ; "prof" is your profile ID; "pwd" is the password associated with that profile; ; "dbs" is a comma-separated list of three-character codes for EBSCO databases ; to which your institution subscribes and for which access is available via the @@ -19,6 +19,9 @@ prof = prof.prof.prof pwd = password dbs = aph,reh,ehh,etc +; This is the EIT API base URL: +base_url = "https://eit.ebscohost.com/Services/SearchService.asmx/Search" + ; This setting controls the default sort order of search results; the selected ; option should be one of the options present in the [Sorting] section below. default_sort = relevance diff --git a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php index f8d197688f45b7cc031aacf3f867de7256f13044..659f76c370637ce89c1575a72741840b9d3f6bea 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php @@ -119,7 +119,8 @@ class EITBackendFactory implements FactoryInterface { $prof = $this->config->General->prof ?? null; $pwd = $this->config->General->pwd ?? null; - $base = "http://eit.ebscohost.com/Services/SearchService.asmx/Search"; + $base = $this->config->General->base_url + ?? 'https://eit.ebscohost.com/Services/SearchService.asmx/Search'; $dbs = $this->config->General->dbs ?? null; $client = $this->serviceLocator->get(\VuFindHttp\HttpService::class) ->createClient(); diff --git a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php index 4dcbac085345bfce49b58c8a67095650852a89c6..9f7651194e8c7d5479824688c0432c1ab649ede5 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php @@ -141,6 +141,12 @@ class EdsBackendFactory implements FactoryInterface 'search_http_method' => $this->edsConfig->General->search_http_method ?? 'POST' ]; + if (isset($this->edsConfig->General->api_url)) { + $options['api_url'] = $this->edsConfig->General->api_url; + } + if (isset($this->edsConfig->General->auth_url)) { + $options['auth_url'] = $this->edsConfig->General->auth_url; + } // Build HTTP client: $client = $this->serviceLocator->get(\VuFindHttp\HttpService::class) ->createClient(); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php index 4dd3be3a6fdfdebac2e4c0be29e15f1569fe4067..97a3a78e867cea3a4a04b974e919961228942d69 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php @@ -51,7 +51,7 @@ abstract class Base * * @var string */ - protected $edsApiHost = 'http://eds-api.ebscohost.com/edsapi/rest'; + protected $edsApiHost = 'https://eds-api.ebscohost.com/edsapi/rest'; /** * Auth host @@ -106,6 +106,12 @@ abstract class Base if (is_array($settings)) { foreach ($settings as $key => $value) { switch ($key) { + case 'api_url': + $this->edsApiHost = $value; + break; + case 'auth_url': + $this->authHost = $value; + break; case 'debug': $this->debug = $value; break;