@@ -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, |
@@ -271,7 +271,7 @@ |
||
| 271 | 271 | $form->addError( |
| 272 | 272 | new FormError( |
| 273 | 273 | $this->get('translator') |
| 274 | - ->trans('gateway.form.gateway_choose_second_factor.unknown_second_factor_type') |
|
| 274 | + ->trans('gateway.form.gateway_choose_second_factor.unknown_second_factor_type') |
|
| 275 | 275 | ) |
| 276 | 276 | ); |
| 277 | 277 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | // Filter the selected second factor from the array collection |
| 249 | 249 | $secondFactorFiltered = $secondFactors->filter( |
| 250 | - function ($secondFactor) use ($secondFactorType) { |
|
| 250 | + function($secondFactor) use ($secondFactorType) { |
|
| 251 | 251 | return $secondFactorType === $secondFactor->secondFactorType; |
| 252 | 252 | } |
| 253 | 253 | ); |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $form = $this->createForm(VerifyYubikeyOtpType::class, $command)->handleRequest($request); |
| 393 | 393 | $cancelForm = $this->buildCancelAuthenticationForm($authenticationMode)->handleRequest($request); |
| 394 | 394 | |
| 395 | - if ($form->isSubmitted() && $form->isValid()) { |
|
| 395 | + if ($form->isSubmitted() && $form->isValid()) { |
|
| 396 | 396 | $result = $this->getStepupService()->verifyYubikeyOtp($command); |
| 397 | 397 | if ($result->didOtpVerificationFail()) { |
| 398 | 398 | $form->addError( |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function registerBundles(): iterable |
| 34 | 34 | { |
| 35 | - $contents = require $this->getProjectDir().'/config/bundles.php'; |
|
| 35 | + $contents = require $this->getProjectDir() . '/config/bundles.php'; |
|
| 36 | 36 | foreach ($contents as $class => $envs) { |
| 37 | 37 | if ($envs[$this->environment] ?? $envs['all'] ?? false) { |
| 38 | 38 | yield new $class(); |
@@ -47,23 +47,23 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void |
| 49 | 49 | { |
| 50 | - $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); |
|
| 50 | + $container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php')); |
|
| 51 | 51 | $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug); |
| 52 | 52 | $container->setParameter('container.dumper.inline_factories', true); |
| 53 | - $confDir = $this->getProjectDir().'/config'; |
|
| 53 | + $confDir = $this->getProjectDir() . '/config'; |
|
| 54 | 54 | |
| 55 | - $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); |
|
| 56 | - $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob'); |
|
| 57 | - $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); |
|
| 58 | - $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); |
|
| 55 | + $loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob'); |
|
| 56 | + $loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob'); |
|
| 57 | + $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob'); |
|
| 58 | + $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob'); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | protected function configureRoutes(RouteCollectionBuilder $routes): void |
| 62 | 62 | { |
| 63 | - $confDir = $this->getProjectDir().'/config'; |
|
| 63 | + $confDir = $this->getProjectDir() . '/config'; |
|
| 64 | 64 | |
| 65 | - $routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, '/', 'glob'); |
|
| 66 | - $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); |
|
| 67 | - $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); |
|
| 65 | + $routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob'); |
|
| 66 | + $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob'); |
|
| 67 | + $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob'); |
|
| 68 | 68 | } |
| 69 | 69 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | if ($subjectNameIdFromResponse !== $secondFactor->secondFactorIdentifier) { |
| 70 | 70 | throw new ReceivedInvalidSubjectNameIdException( |
| 71 | 71 | sprintf( |
| 72 | - 'The nameID received from the GSSP (%s) did not match the selected second factor (%s). This '. |
|
| 72 | + 'The nameID received from the GSSP (%s) did not match the selected second factor (%s). This ' . |
|
| 73 | 73 | 'might be an indication someone is tampering with a GSSP. The authentication was started by %s', |
| 74 | 74 | $subjectNameIdFromResponse, |
| 75 | 75 | $secondFactor->secondFactorIdentifier, |
@@ -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()) { |
@@ -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 |