@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $configuration = new Configuration(); |
42 | 42 | $config = $this->processConfiguration($configuration, $configs); |
43 | 43 | |
44 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
44 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
45 | 45 | $loader->load('services.yml'); |
46 | 46 | |
47 | 47 | $connectedServiceProviders = $container->getDefinition('gssp.allowed_sps'); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $hostedDefinition = $this->buildHostedEntityDefinition($provider, $configuration, $routes); |
137 | 137 | $container->setDefinition('gssp.provider.' . $provider . '.hosted_entities', $hostedDefinition); |
138 | 138 | |
139 | - $hostedSpDefinition = (new Definition()) |
|
139 | + $hostedSpDefinition = (new Definition()) |
|
140 | 140 | ->setClass('Surfnet\SamlBundle\Entity\ServiceProvider') |
141 | 141 | ->setFactory([new Reference('gssp.provider.' . $provider . '.hosted_entities'), 'getServiceProvider']) |
142 | 142 | ->setPublic(false); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | private function createRemoteDefinition($provider, array $configuration, ContainerBuilder $container) |
191 | 191 | { |
192 | - $definition = new Definition('Surfnet\SamlBundle\Entity\IdentityProvider', [ |
|
192 | + $definition = new Definition('Surfnet\SamlBundle\Entity\IdentityProvider', [ |
|
193 | 193 | [ |
194 | 194 | 'entityId' => $configuration['entity_id'], |
195 | 195 | 'ssoUrl' => $configuration['sso_url'], |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ->scalarNode('sso') |
57 | 57 | ->isRequired() |
58 | 58 | ->validate() |
59 | - ->ifTrue(function ($v) { |
|
59 | + ->ifTrue(function($v) { |
|
60 | 60 | return !is_string($v) || strlen($v) === 0; |
61 | 61 | }) |
62 | 62 | ->thenInvalid('SSO route must be a non-empty string') |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ->scalarNode('consume_assertion') |
66 | 66 | ->isRequired() |
67 | 67 | ->validate() |
68 | - ->ifTrue(function ($v) { |
|
68 | + ->ifTrue(function($v) { |
|
69 | 69 | return !is_string($v) || strlen($v) === 0; |
70 | 70 | }) |
71 | 71 | ->thenInvalid('Consume assertion route must be a non-empty string') |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ->scalarNode('metadata') |
75 | 75 | ->isRequired() |
76 | 76 | ->validate() |
77 | - ->ifTrue(function ($v) { |
|
77 | + ->ifTrue(function($v) { |
|
78 | 78 | return !is_string($v) || strlen($v) === 0; |
79 | 79 | }) |
80 | 80 | ->thenInvalid('Metadata route must be a non-empty string') |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $taggedServices = array_keys($taggedServices); |
43 | 43 | |
44 | 44 | foreach ($taggedServices as $id) { |
45 | - $gsspIdMatches= []; |
|
45 | + $gsspIdMatches = []; |
|
46 | 46 | preg_match('/^gssp\.view_config\.(\w+)$/', $id, $gsspIdMatches); |
47 | 47 | if (!is_array($gsspIdMatches)) { |
48 | 48 | throw new InvalidConfigurationException('A manually tagged view config service was named incorrectly.'); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $this->stateHandler = $stateHandler; |
75 | 75 | $this->assertionSigningService = $assertionSigningService; |
76 | 76 | |
77 | - $this->currentTime = is_null($now) ? new DateTime('now', new DateTimeZone('UTC')): $now; |
|
77 | + $this->currentTime = is_null($now) ? new DateTime('now', new DateTimeZone('UTC')) : $now; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function getConfigurationOf(string $serviceProvider): ServiceProvider |
49 | 49 | { |
50 | 50 | if (!$this->isConnected($serviceProvider)) { |
51 | - throw UnknownProviderException::create($serviceProvider, (string )$this->allowed); |
|
51 | + throw UnknownProviderException::create($serviceProvider, (string) $this->allowed); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return $this->samlEntityService->getServiceProvider($serviceProvider); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | $response = $this->responseProxy->createProxyResponse( |
97 | 97 | $responseContext->reconstituteAssertion(), |
98 | 98 | $responseContext->getDestination(), |
99 | - (string)$grantedLoa |
|
99 | + (string) $grantedLoa |
|
100 | 100 | ); |
101 | 101 | |
102 | 102 | $logger->notice(sprintf( |
@@ -160,7 +160,7 @@ |
||
160 | 160 | private function addAuthenticationStatementTo(Assertion $newAssertion, Assertion $assertion) |
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( |
@@ -107,7 +107,7 @@ |
||
107 | 107 | 'institution' => $secondFactor->institution, |
108 | 108 | 'authentication_result' => $stateHandler->isSecondFactorVerified() ? 'OK' : 'FAILED', |
109 | 109 | 'resulting_loa' => (string) $loa, |
110 | - 'sso' => $stateHandler->isVerifiedBySsoOn2faCookie() ? 'YES': 'NO', |
|
110 | + 'sso' => $stateHandler->isVerifiedBySsoOn2faCookie() ? 'YES' : 'NO', |
|
111 | 111 | ]; |
112 | 112 | |
113 | 113 | if ($stateHandler->isVerifiedBySsoOn2faCookie()) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function inResponseToMatches($inResponseTo) |
37 | 37 | { |
38 | - return $this->getInResponseTo() === $inResponseTo; |
|
38 | + return $this->getInResponseTo() === $inResponseTo; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |