|
@@ -49,7 +49,7 @@ discard block |
|
|
block discarded – undo |
|
49
|
49
|
{ |
|
50
|
50
|
$configuration = new Configuration(); |
|
51
|
51
|
$config = $this->processConfiguration($configuration, $configs); |
|
52
|
|
- $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
|
52
|
+ $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
53
|
53
|
$loader->load('services.yml'); |
|
54
|
54
|
|
|
55
|
55
|
foreach ($config['providers'] as $provider => $providerConfiguration) { |
|
@@ -154,7 +154,7 @@ discard block |
|
|
block discarded – undo |
|
154
|
154
|
$hostedDefinition = $this->buildHostedEntityDefinition($provider, $configuration, $routes); |
|
155
|
155
|
$container->setDefinition('gssp.provider.' . $provider . '.hosted_entities', $hostedDefinition); |
|
156
|
156
|
|
|
157
|
|
- $hostedSpDefinition = (new Definition()) |
|
|
157
|
+ $hostedSpDefinition = (new Definition()) |
|
158
|
158
|
->setClass(\Surfnet\SamlBundle\Entity\ServiceProvider::class) |
|
159
|
159
|
->setFactory([ |
|
160
|
160
|
new Reference('gssp.provider.' . $provider . '.hosted_entities'), |
|
@@ -192,7 +192,7 @@ discard block |
|
|
block discarded – undo |
|
192
|
192
|
|
|
193
|
193
|
private function createRemoteDefinition(string $provider, array $configuration, ContainerBuilder $container): void |
|
194
|
194
|
{ |
|
195
|
|
- $definition = new Definition(IdentityProvider::class, [ |
|
|
195
|
+ $definition = new Definition(IdentityProvider::class, [ |
|
196
|
196
|
[ |
|
197
|
197
|
'entityId' => $configuration['entity_id'], |
|
198
|
198
|
'ssoUrl' => $configuration['sso_url'], |
|
@@ -249,14 +249,14 @@ discard block |
|
|
block discarded – undo |
|
249
|
249
|
|
|
250
|
250
|
private function validateDescriptions($descriptions, $appUrl, string $provider, string $type): void |
|
251
|
251
|
{ |
|
252
|
|
- $regex ="/%%{$type}_link_start%%[a-zA-Z0-9 ]+%%{$type}_link_end%%/"; |
|
|
252
|
+ $regex = "/%%{$type}_link_start%%[a-zA-Z0-9 ]+%%{$type}_link_end%%/"; |
|
253
|
253
|
foreach ($descriptions as $lang => $description) { |
|
254
|
254
|
if ($appUrl !== false && preg_match($regex, (string) $description) === 0) { |
|
255
|
255
|
throw new InvalidConfigurationException( |
|
256
|
256
|
sprintf( |
|
257
|
257
|
'You have configured a GSSP provider with app URL\'s but the description is not ' . |
|
258
|
258
|
'configured correctly yet. Missing "%%%1$s_link_start%%" or "%%%1$s_link_end%%" in ' . |
|
259
|
|
- 'GSSP description for language "%2$s" in "providers.%3$s.view_config.description" of '. |
|
|
259
|
+ 'GSSP description for language "%2$s" in "providers.%3$s.view_config.description" of ' . |
|
260
|
260
|
'samlstepupproviders.yml', |
|
261
|
261
|
$type, |
|
262
|
262
|
$lang, |