diff --git a/src/Plugin/OpenIDConnectClient/Tunnistamo.php b/src/Plugin/OpenIDConnectClient/Tunnistamo.php index 97e2028..529ddcb 100644 --- a/src/Plugin/OpenIDConnectClient/Tunnistamo.php +++ b/src/Plugin/OpenIDConnectClient/Tunnistamo.php @@ -297,7 +297,7 @@ public function getClientScopes(): array { $scopes = $this->configuration['client_scopes'] ?? []; if (!$scopes) { - return []; + return parent::getClientScopes(); } return explode(',', $this->configuration['client_scopes']); } diff --git a/tests/src/Kernel/TunnistamoClientTest.php b/tests/src/Kernel/TunnistamoClientTest.php index 6398d56..65bbca3 100644 --- a/tests/src/Kernel/TunnistamoClientTest.php +++ b/tests/src/Kernel/TunnistamoClientTest.php @@ -22,7 +22,7 @@ public function testGetClientScopes() : void { $config = $plugin->getConfiguration(); $this->assertSame($config['client_scopes'], $plugin->defaultConfiguration()['client_scopes']); $this->setPluginConfiguration('client_scopes', ''); - $this->assertSame([], $this->getPlugin()->getClientScopes()); + $this->assertSame(['openid', 'email'], $this->getPlugin()->getClientScopes()); } /**