Skip to content
Open
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
71379da
Use config array instead of object for Auth plugins
rtloftus Sep 3, 2026
5c0a492
composer fix
rtloftus Sep 3, 2026
de19999
update test
rtloftus Sep 3, 2026
8980019
logintokenmanagertest
rtloftus Sep 3, 2026
242c25a
logintokenmanagertest
rtloftus Sep 8, 2026
7e21c77
emailauthenticatortest
rtloftus Sep 8, 2026
1a65b99
managertest
rtloftus Sep 8, 2026
1d8746b
managerfactory
rtloftus Sep 8, 2026
d356131
logintokenmanagerfactory
rtloftus Sep 8, 2026
28cf6b4
emailauthenticatorfactory
rtloftus Sep 8, 2026
24f412d
manager
rtloftus Sep 8, 2026
af668be
emailauthenticator
rtloftus Sep 8, 2026
9abba25
logintokenmanager
rtloftus Sep 8, 2026
f165d99
almadatabase
rtloftus Sep 8, 2026
68e998c
Use config array instead of object in OAI Server code (#5614)
rtloftus Sep 3, 2026
e81a514
Use config array instead of object in OpenURL view helper (#5616)
rtloftus Sep 4, 2026
f519c7e
Use config array instead of object in AccountCapabilities service (#5…
rtloftus Sep 4, 2026
ed4e014
Eliminate use of intval in ProxyURL view helper (#5619)
rtloftus Sep 4, 2026
8775658
Eliminate dependency on slm/locale. (#5624)
EreMaijala Sep 7, 2026
e8e53a2
RateLimiter: Add minimal text to the Turnstile challenge page (#5618)
maccabeelevine Sep 7, 2026
69c0c60
Add unit tests for Collections browse actions. (#5633)
3pleX-dev Sep 7, 2026
44cb3de
Fix bug: language globals must initialize after language detection. (…
demiankatz Sep 7, 2026
3d01265
Fix last search links (#5634)
ThoWagen Sep 7, 2026
02510d8
Don't update browser url when navigating tabs in search results (#5518)
dennmuel Sep 7, 2026
2ffc761
Test that embedded tabs do not change URL inappropriately. (#5602)
demiankatz Sep 7, 2026
87338ac
Make result backendId nullable (#5632)
ThoWagen Sep 8, 2026
6a3eba5
Bump eslint-plugin-jsdoc from 64.2.1 to 64.3.5 (#5629)
dependabot[bot] Sep 8, 2026
170e81e
Bump globals from 17.11.0 to 17.12.0 (#5630)
dependabot[bot] Sep 8, 2026
d122970
Bump phpstan/phpstan from 2.2.9 to 2.2.13 (#5628)
dependabot[bot] Sep 8, 2026
0dd88d7
Bump friendsofphp/php-cs-fixer from 3.95.23 to 3.95.24 (#5625)
dependabot[bot] Sep 8, 2026
4d7f3e4
Use config array instead of object for Relais view helper (#5623)
rtloftus Sep 8, 2026
c33c539
Use config array instead of object for CSP header generator (#5622)
rtloftus Sep 8, 2026
d949534
Bump monolog/monolog from 3.10.0 to 3.11.0 (#5627)
dependabot[bot] Sep 8, 2026
41ef080
Bump libphonenumber-js from 1.13.8 to 1.13.11 (#5492)
dependabot[bot] Sep 8, 2026
960caa4
Use config array instead of object for Auth Utils (#5637)
rtloftus Sep 8, 2026
50f8329
Add unit tests for Collections index browse. (#5636)
3pleX-dev Sep 9, 2026
441f7da
Use config array instead of object for Session Handlers (#5640)
rtloftus Sep 9, 2026
d01cbb7
Refactor ErrorController to actions. (#5533)
EreMaijala Sep 9, 2026
861a889
Add Mink test for System/available setting. (#5650)
demiankatz Sep 9, 2026
3b97a93
Fix upgrading in subdirectories (#5649)
ThoWagen Sep 9, 2026
7c7546f
Bump stripe/stripe-php from 21.0.0 to 21.3.1 (#5626)
dependabot[bot] Sep 9, 2026
67f63f8
Fix stale refreshOnClose when lightbox is closed (#5647)
maccabeelevine Sep 9, 2026
101a171
Fix arbitrary attributes flag in script rendering (#5648)
maccabeelevine Sep 9, 2026
efc5f44
Use config array instead of object for WorldCat2 BackendFactory (#5621)
rtloftus Sep 9, 2026
576ac47
KohaRest: Fix status message code check for NotForLoan or Lost status…
EreMaijala Sep 9, 2026
ccea50b
Use config array instead of object on Sitemap Generator (#5641)
rtloftus Sep 9, 2026
305b4eb
Use config array instead of object for ContentPages Sitemap plugin (#…
rtloftus Sep 9, 2026
25a4688
Use config array instead of object on ResolverLinks and SystemStatus …
rtloftus Sep 9, 2026
488570d
Use config array instead of object for SimilarBuilder Backend module …
rtloftus Sep 9, 2026
43622d2
Use config array instead of object for LibGuidesProfile Recommend mod…
rtloftus Sep 9, 2026
189323d
Use config array instead of object for Facet Search Params (#5639)
rtloftus Sep 10, 2026
d61fd64
Use config array instead of object for Consortial VuFind Recommend mo…
rtloftus Sep 10, 2026
6407fde
Add new translation key/string pair for export format and update obso…
kouralex Sep 10, 2026
d98e35c
Use config array instead of object for Facet Recommend modules (#5645)
rtloftus Sep 10, 2026
c5797d9
Use config array instead of object for I18n module (#5638)
rtloftus Sep 10, 2026
872e4c2
Use config array instead of value in Interval Captcha module (#5655)
rtloftus Sep 10, 2026
9d4a7d6
update manager setConfig func
rtloftus Sep 10, 2026
fd4430a
Merge branch 'dev' into abstract-base-auth
rtloftus Sep 10, 2026
6af3049
wrap setConfig
rtloftus Sep 10, 2026
1a62470
wrapped setconfig to array
rtloftus Sep 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions module/VuFind/src/VuFind/Auth/AbstractBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class AbstractBase implements
/**
* Configuration settings.
*
* @var \VuFind\Config\Config
* @var array
*/
protected $config = null;

Expand Down Expand Up @@ -101,7 +101,7 @@ abstract class AbstractBase implements
* exception if the configuration is invalid.
*
* @throws AuthException
* @return \VuFind\Config\Config
* @return array
*/
public function getConfig()
{
Expand Down Expand Up @@ -145,7 +145,7 @@ public function clearLoginState()
/**
* Set configuration.
*
* @param \VuFind\Config\Config $config Configuration to set
* @param array $config Configuration to set
*
* @return void
*/
Expand Down Expand Up @@ -450,9 +450,8 @@ public function getPolicyConfig(string $type): array
{
$policy = [];
$config = $this->getConfig();
$authConfig = isset($config->Authentication)
? $config->Authentication->toArray()
: [];
$authConfig = $config['Authentication']
?? [];
/* Map settings to the policy array, e.g.:
*
* password_minimum_length or username_minimum_length => minLength
Expand Down
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/Auth/AlmaDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function create($request)
{
// When in privacy mode, don't create an Alma account and delegate
// further code execution to the parent.
if ($this->getConfig()->Authentication->privacy) {
if ($this->getConfig()['Authentication']['privacy']) {
return parent::create($request);
}

Expand Down
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/Auth/AuthInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function clearLoginState();
/**
* Set configuration.
*
* @param \VuFind\Config\Config $config Configuration to set
* @param array $config Configuration to set
*
* @return void
*/
Expand Down
8 changes: 4 additions & 4 deletions module/VuFind/src/VuFind/Auth/ChoiceAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public function __construct(\Laminas\Session\Container $container)
protected function validateConfig()
{
if (
!isset($this->config->ChoiceAuth->choice_order)
|| !strlen($this->config->ChoiceAuth->choice_order)
!isset($this->config['ChoiceAuth']['choice_order'])
|| !strlen($this->config['ChoiceAuth']['choice_order'])
) {
throw new AuthException(
'One or more ChoiceAuth parameters are missing. ' .
Expand All @@ -120,7 +120,7 @@ protected function validateConfig()
/**
* Set configuration; throw an exception if it is invalid.
*
* @param \VuFind\Config\Config $config Configuration to set
* @param $config Configuration to set
*
* @throws AuthException
* @return void
Expand All @@ -130,7 +130,7 @@ public function setConfig($config)
parent::setConfig($config);
$this->strategies = array_map(
'trim',
explode(',', $this->getConfig()->ChoiceAuth->choice_order)
explode(',', $this->getConfig()['ChoiceAuth']['choice_order'])
);
}

Expand Down
1 change: 0 additions & 1 deletion module/VuFind/src/VuFind/Auth/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use Lmc\Rbac\Identity\IdentityInterface;
use Lmc\Rbac\Mvc\Identity\IdentityProviderInterface;
use Psr\Log\LoggerAwareInterface;
use VuFind\Config\Config;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still being used on line 206 -- that's the reason the tests are failing.

use VuFind\Cookie\CookieManager;
use VuFind\Db\Entity\UserEntityInterface;
use VuFind\Db\Service\AuditEventServiceInterface;
Expand Down
14 changes: 7 additions & 7 deletions module/VuFind/src/VuFind/Auth/MultiAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class MultiAuth extends AbstractBase
*/
protected function validateConfig()
{
if (empty($this->config->MultiAuth->method_order)) {
if (empty($this->config['MultiAuth']['method_order'])) {
throw new AuthException(
'One or more MultiAuth parameters are missing. ' .
'Check your config.ini!'
Expand All @@ -126,27 +126,27 @@ protected function validateConfig()
/**
* Set configuration; throw an exception if it is invalid.
*
* @param \VuFind\Config\Config $config Configuration to set
* @param array $config Configuration to set
*
* @throws AuthException
* @return void
*/
public function setConfig($config)
{
parent::setConfig($config);
if (isset($config->MultiAuth->method_order)) {
if (isset($config['MultiAuth']['method_order'])) {
$this->methods = array_map(
'trim',
explode(',', $config->MultiAuth->method_order)
explode(',', $config['MultiAuth']['method_order'])
);
}
if (
isset($config->MultiAuth->filters)
&& strlen($config->MultiAuth->filters)
isset($config['MultiAuth']['filters'])
&& strlen($config['MultiAuth']['filters'])
) {
$this->filters = array_map(
'trim',
explode(',', $config->MultiAuth->filters)
explode(',', $config['MultiAuth']['filters'])
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/Auth/PasswordAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PasswordAccess extends AbstractBase
* exception if the configuration is invalid.
*
* @throws AuthException
* @return \VuFind\Config\Config
* @return array
*/
public function getConfig()
{
Expand All @@ -76,7 +76,7 @@ public function getConfig()
*/
public function authenticate($request)
{
$config = $this->getConfig()->toArray();
$config = $this->getConfig();
$requestPassword = trim($request->getPost()->get('password', ''));
foreach ($config['PasswordAccess']['access_user_hashed'] ?? [] as $username => $passwordHash) {
if (password_verify($requestPassword, $passwordHash)) {
Expand Down
28 changes: 14 additions & 14 deletions module/VuFind/src/VuFind/Auth/Shibboleth.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ public function __construct(
/**
* Set configuration.
*
* @param \VuFind\Config\Config $config Configuration to set
* @param array $config Configuration to set
*
* @return void
*/
public function setConfig($config)
{
parent::setConfig($config);
$this->useHeaders = $this->config->Shibboleth->use_headers ?? false;
$this->shibIdentityProvider = $this->config->Shibboleth->idpserverparam
$this->useHeaders = $this->config['Shibboleth']['use_headers'] ?? false;
$this->shibIdentityProvider = $this->config['Shibboleth']['idpserverparam']
?? self::DEFAULT_IDPSERVERPARAM;
$this->shibSessionId = $this->config->Shibboleth->session_id ?? null;
$this->shibSessionId = $this->config['Shibboleth']['session_id'] ?? null;
}

/**
Expand All @@ -140,8 +140,8 @@ public function setConfig($config)
protected function validateConfig()
{
// Throw an exception if the required username setting is missing.
$shib = $this->config->Shibboleth;
if (!isset($shib->username) || empty($shib->username)) {
$shib = $this->config['Shibboleth'];
if (!isset($shib['username']) || empty([$shib['username']])) {
throw new AuthException(
'Shibboleth username is missing in your configuration file.'
);
Expand Down Expand Up @@ -239,17 +239,17 @@ public function authenticate($request)
public function getSessionInitiator(string $target): ?string
{
$config = $this->getConfig();
$shibTarget = $config->Shibboleth->target ?? $target;
$shibTarget = $config['Shibboleth']['target'] ?? $target;
$append = (str_contains($shibTarget, '?')) ? '&' : '?';
// Adding the auth_method parameter makes it possible to handle logins when
// using an auth method that proxies others.
$sessionInitiator = $config->Shibboleth->login
$sessionInitiator = $config['Shibboleth']['login']
. '?target=' . urlencode($shibTarget)
. urlencode($append . 'auth_method=Shibboleth');

if (isset($config->Shibboleth->provider_id)) {
if (isset($config['Shibboleth']['provider_id'])) {
$sessionInitiator = $sessionInitiator . '&entityID=' .
urlencode($config->Shibboleth->provider_id);
urlencode($config['Shibboleth']['provider_id']);
}

return $sessionInitiator;
Expand All @@ -265,7 +265,7 @@ public function isExpired()
$config = $this->getConfig();
if (
!isset($this->shibSessionId)
|| !($config->Shibboleth->checkExpiredSession ?? true)
|| !($config['Shibboleth']['checkExpiredSession'] ?? true)
) {
return false;
}
Expand All @@ -284,9 +284,9 @@ public function getLogoutRedirectUrl(string $url): string
{
// If single log-out is enabled, use a special URL:
$config = $this->getConfig();
if (!empty($config->Shibboleth->logout)) {
$append = (str_contains($config->Shibboleth->logout, '?')) ? '&' : '?';
$url = $config->Shibboleth->logout . $append . 'return=' . urlencode($url);
if (!empty($config['Shibboleth']['logout'])) {
$append = (str_contains($config['Shibboleth']['logout'], '?')) ? '&' : '?';
$url = $config['Shibboleth']['logout'] . $append . 'return=' . urlencode($url);
}

// Send back the redirect URL (possibly modified):
Expand Down
Loading