@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $builder->add('send_challenge', SubmitType::class, [ |
| 31 | 31 | 'label' => 'gateway.form.gateway_send_sms_challenge.button.send_challenge', |
| 32 | - 'attr' => [ 'class' => 'btn btn-primary' ], |
|
| 32 | + 'attr' => ['class' => 'btn btn-primary'], |
|
| 33 | 33 | ]); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | return new Cookie( |
| 95 | 95 | $this->configuration->getName(), |
| 96 | 96 | $value, |
| 97 | - $this->configuration->isPersistent() ? $this->getTimestamp($this->configuration->getLifetime()): 0, |
|
| 97 | + $this->configuration->isPersistent() ? $this->getTimestamp($this->configuration->getLifetime()) : 0, |
|
| 98 | 98 | '/', |
| 99 | 99 | null, |
| 100 | 100 | true, |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | } else { |
| 150 | 150 | // Render the regular SAML response, we do not return it yet, the SSO on 2FA handler will use it to store |
| 151 | 151 | // the SSO on 2FA cookie. |
| 152 | - $httpResponse = $responseRendering->renderResponse($responseContext, $response, $request); |
|
| 152 | + $httpResponse = $responseRendering->renderResponse($responseContext, $response, $request); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | if ($response->isSuccess()) { |
@@ -160,7 +160,7 @@ |
||
| 160 | 160 | private function addAuthenticationStatementTo(Assertion $newAssertion, Assertion $assertion): void |
| 161 | 161 | { |
| 162 | 162 | $newAssertion->setAuthnInstant($assertion->getAuthnInstant()); |
| 163 | - $newAssertion->setAuthnContextClassRef((string)$this->intrinsicLoa); |
|
| 163 | + $newAssertion->setAuthnContextClassRef((string) $this->intrinsicLoa); |
|
| 164 | 164 | |
| 165 | 165 | $authority = $assertion->getAuthenticatingAuthority(); |
| 166 | 166 | $newAssertion->setAuthenticatingAuthority( |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | public function anInstitutionThatAllows(string $institution, string $option): void |
| 199 | 199 | { |
| 200 | - switch(true) { |
|
| 200 | + switch (true) { |
|
| 201 | 201 | case $option === 'sso_on_2fa': |
| 202 | 202 | $optionColumnName = 'sso_on2fa_enabled'; |
| 203 | 203 | break; |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | private function getCookieNames(array $responseCookieHeaders): array |
| 366 | 366 | { |
| 367 | 367 | $response = []; |
| 368 | - foreach($responseCookieHeaders as $cookie) { |
|
| 368 | + foreach ($responseCookieHeaders as $cookie) { |
|
| 369 | 369 | $parts = explode('=', $cookie); |
| 370 | 370 | $response[] = array_shift($parts); |
| 371 | 371 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $configuration = new Configuration(); |
| 43 | 43 | $config = $this->processConfiguration($configuration, $configs); |
| 44 | 44 | |
| 45 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 45 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 46 | 46 | $loader->load('services.yml'); |
| 47 | 47 | |
| 48 | 48 | $connectedServiceProviders = $container->getDefinition('gssp.allowed_sps'); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $hostedDefinition = $this->buildHostedEntityDefinition($provider, $configuration, $routes); |
| 138 | 138 | $container->setDefinition('gssp.provider.' . $provider . '.hosted_entities', $hostedDefinition); |
| 139 | 139 | |
| 140 | - $hostedSpDefinition = (new Definition()) |
|
| 140 | + $hostedSpDefinition = (new Definition()) |
|
| 141 | 141 | ->setClass(\Surfnet\SamlBundle\Entity\ServiceProvider::class) |
| 142 | 142 | ->setFactory([new Reference('gssp.provider.' . $provider . '.hosted_entities'), 'getServiceProvider']) |
| 143 | 143 | ->setPublic(false); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | private function createRemoteDefinition($provider, array $configuration, ContainerBuilder $container): void |
| 192 | 192 | { |
| 193 | - $definition = new Definition(\Surfnet\SamlBundle\Entity\IdentityProvider::class, [ |
|
| 193 | + $definition = new Definition(\Surfnet\SamlBundle\Entity\IdentityProvider::class, [ |
|
| 194 | 194 | [ |
| 195 | 195 | 'entityId' => $configuration['entity_id'], |
| 196 | 196 | 'ssoUrl' => $configuration['sso_url'], |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | $ignoreErrors = []; |
| 4 | 4 | $ignoreErrors[] = [ |
@@ -2,17 +2,17 @@ |
||
| 2 | 2 | |
| 3 | 3 | $ignoreErrors = []; |
| 4 | 4 | $ignoreErrors[] = [ |
| 5 | - // identifier: function.deprecated |
|
| 6 | - 'message' => '#^Call to deprecated function GuzzleHttp\\\\json_decode\\(\\)\\: |
|
| 5 | + // identifier: function.deprecated |
|
| 6 | + 'message' => '#^Call to deprecated function GuzzleHttp\\\\json_decode\\(\\)\\: |
|
| 7 | 7 | json_decode will be removed in guzzlehttp/guzzle\\:8\\.0\\. Use Utils\\:\\:jsonDecode instead\\.$#', |
| 8 | - 'count' => 1, |
|
| 9 | - 'path' => __DIR__ . '/../../src/Surfnet/StepupGateway/GatewayBundle/Entity/SamlEntity.php', |
|
| 8 | + 'count' => 1, |
|
| 9 | + 'path' => __DIR__ . '/../../src/Surfnet/StepupGateway/GatewayBundle/Entity/SamlEntity.php', |
|
| 10 | 10 | ]; |
| 11 | 11 | $ignoreErrors[] = [ |
| 12 | - // identifier: parameter.requiredAfterOptional |
|
| 13 | - 'message' => '#^Deprecated in PHP 8\\.0\\: Required parameter \\$value follows optional parameter \\$propertyPath\\.$#', |
|
| 14 | - 'count' => 1, |
|
| 15 | - 'path' => __DIR__ . '/../../src/Surfnet/StepupGateway/GatewayBundle/Exception/AssertionFailedException.php', |
|
| 12 | + // identifier: parameter.requiredAfterOptional |
|
| 13 | + 'message' => '#^Deprecated in PHP 8\\.0\\: Required parameter \\$value follows optional parameter \\$propertyPath\\.$#', |
|
| 14 | + 'count' => 1, |
|
| 15 | + 'path' => __DIR__ . '/../../src/Surfnet/StepupGateway/GatewayBundle/Exception/AssertionFailedException.php', |
|
| 16 | 16 | ]; |
| 17 | 17 | |
| 18 | 18 | return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | { |
| 105 | 105 | $newAssertion = new Assertion(); |
| 106 | 106 | $newAssertion->setNotBefore(time()); |
| 107 | - $newAssertion->setNotOnOrAfter(time() + (60 * 5));// |
|
| 107 | + $newAssertion->setNotOnOrAfter(time() + (60 * 5)); // |
|
| 108 | 108 | $newAssertion->setAttributes(['urn:mace:dir:attribute-def:eduPersonTargetedID' => [NameID::fromArray($nameId)]]); |
| 109 | 109 | $newAssertion->setIssuer('https://idp.dev.openconext.local/'); |
| 110 | 110 | $newAssertion->setIssueInstant(time()); |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | sprintf( |
| 76 | 76 | 'Unable to insert the new SP saml_entity. PDO raised this error: "%s"', |
| 77 | 77 | $stmt->errorInfo()[2] |
| 78 | - ) |
|
| 78 | + ) |
|
| 79 | 79 | ); |
| 80 | 80 | } else { |
| 81 | 81 | // Return the SP data |