@@ -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( |
@@ -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[] = [ |
@@ -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()); |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Symfony\Component\Yaml\Yaml; |
| 4 | 4 | |
| 5 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 6 | -$parametersPath = dirname(__DIR__).'/config/openconext/parameters.yaml'; |
|
| 5 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
| 6 | +$parametersPath = dirname(__DIR__) . '/config/openconext/parameters.yaml'; |
|
| 7 | 7 | $parameters = Yaml::parseFile($parametersPath); |
| 8 | 8 | $parameters = $parameters['parameters']; |
| 9 | 9 | $requiredParameters = ['app_env', 'app_debug', 'app_secret']; |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use App\Kernel; |
| 3 | 3 | |
| 4 | -require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; |
|
| 5 | -require_once dirname(__DIR__).'/config/bootstrap.php'; |
|
| 4 | +require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; |
|
| 5 | +require_once dirname(__DIR__) . '/config/bootstrap.php'; |
|
| 6 | 6 | |
| 7 | -return function (array $context) { |
|
| 7 | +return function(array $context) { |
|
| 8 | 8 | return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); |
| 9 | 9 | }; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | ->scalarNode('http_basic_realm') |
| 35 | 35 | ->defaultValue('Secure Gateway API') |
| 36 | 36 | ->validate() |
| 37 | - ->ifTrue(function ($realm) { |
|
| 37 | + ->ifTrue(function($realm) { |
|
| 38 | 38 | return !is_string($realm) || empty($realm); |
| 39 | 39 | }) |
| 40 | 40 | ->thenInvalid("Invalid HTTP Basic realm '%s'. Must be string and non-empty.") |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | |
| 141 | 141 | $httpResponse = (new Response)->setContent( |
| 142 | 142 | $this->templateEngine->render( |
| 143 | - '@default/gateway/'.$view.'.html.twig', |
|
| 143 | + '@default/gateway/' . $view . '.html.twig', |
|
| 144 | 144 | $parameters |
| 145 | 145 | ) |
| 146 | 146 | ); |