@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | name: 'ss_registration_display_types', |
| 49 | 49 | methods: ['GET'], |
| 50 | 50 | )] |
| 51 | - public function displaySecondFactorTypes(): \Symfony\Component\HttpFoundation\Response|array |
|
| 51 | + public function displaySecondFactorTypes(): \Symfony\Component\HttpFoundation\Response | array |
|
| 52 | 52 | { |
| 53 | 53 | $institution = $this->getIdentity()->institution; |
| 54 | 54 | $institutionConfigurationOptions = $this->get('self_service.service.institution_configuration_options') |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | name: 'ss_second_factor_vetting_types', |
| 106 | 106 | methods: ['GET'], |
| 107 | 107 | )] |
| 108 | - public function displayVettingTypes(Request $request, string $secondFactorId): array|Response |
|
| 108 | + public function displayVettingTypes(Request $request, string $secondFactorId): array | Response |
|
| 109 | 109 | { |
| 110 | 110 | /** |
| 111 | 111 | * @var VettingTypeService |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | name: 'ss_registration_verify_email', |
| 188 | 188 | methods: ['GET'], |
| 189 | 189 | )] |
| 190 | - public function verifyEmail(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|array |
|
| 190 | + public function verifyEmail(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse | array |
|
| 191 | 191 | { |
| 192 | 192 | $nonce = $request->query->get('n', ''); |
| 193 | 193 | $identityId = $this->getIdentity()->id; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | #[Route( |
| 145 | 145 | path: '/second-factor/{secondFactorId}/self-asserted-token-registration/{recoveryTokenId}', |
| 146 | 146 | name: 'ss_second_factor_self_asserted_tokens_recovery_token', |
| 147 | - methods: ['GET','POST'] |
|
| 147 | + methods: ['GET', 'POST'] |
|
| 148 | 148 | )] |
| 149 | 149 | public function selfAssertedTokenRegistrationRecoveryToken( |
| 150 | 150 | Request $request, |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | #[Route( |
| 269 | 269 | path: '/second-factor/{secondFactorId}/self-asserted-token-registration/{recoveryTokenId}/authenticate', |
| 270 | 270 | name: 'ss_second_factor_self_asserted_tokens_recovery_token_sms', |
| 271 | - methods: ['GET','POST'] |
|
| 271 | + methods: ['GET', 'POST'] |
|
| 272 | 272 | )] |
| 273 | 273 | public function selfAssertedTokenRecoveryTokenSmsAuthentication( |
| 274 | 274 | Request $request, |
@@ -341,9 +341,9 @@ discard block |
||
| 341 | 341 | #[Route( |
| 342 | 342 | path: '/second-factor/{secondFactorId}/safe-store', |
| 343 | 343 | name: 'ss_registration_recovery_token_safe_store', |
| 344 | - methods: ['GET','POST'] |
|
| 344 | + methods: ['GET', 'POST'] |
|
| 345 | 345 | )] |
| 346 | - public function registerCreateRecoveryTokenSafeStore(Request $request, string $secondFactorId): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response |
|
| 346 | + public function registerCreateRecoveryTokenSafeStore(Request $request, string $secondFactorId): \Symfony\Component\HttpFoundation\RedirectResponse | \Symfony\Component\HttpFoundation\Response |
|
| 347 | 347 | { |
| 348 | 348 | $identity = $this->getIdentity(); |
| 349 | 349 | $this->assertSecondFactorInPossession($secondFactorId, $identity); |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | #[Route( |
| 387 | 387 | path: '/second-factor/{secondFactorId}/sms', |
| 388 | 388 | name: 'ss_registration_recovery_token_sms', |
| 389 | - methods: ['GET','POST'], |
|
| 389 | + methods: ['GET', 'POST'], |
|
| 390 | 390 | )] |
| 391 | 391 | public function registerRecoveryTokenSms(Request $request, string $secondFactorId): \Symfony\Component\HttpFoundation\Response |
| 392 | 392 | { |
@@ -96,9 +96,9 @@ |
||
| 96 | 96 | path: '/second-factor/{state}/{secondFactorId}/revoke', |
| 97 | 97 | name: 'ss_second_factor_revoke', |
| 98 | 98 | requirements: ['state' => '^(unverified|verified|vetted)$'], |
| 99 | - methods: ['GET','POST'] |
|
| 99 | + methods: ['GET', 'POST'] |
|
| 100 | 100 | )] |
| 101 | - public function revoke(Request $request, string $state, string $secondFactorId): array|Response |
|
| 101 | + public function revoke(Request $request, string $state, string $secondFactorId): array | Response |
|
| 102 | 102 | { |
| 103 | 103 | $identity = $this->getIdentity(); |
| 104 | 104 | |
@@ -35,9 +35,9 @@ |
||
| 35 | 35 | #[Route( |
| 36 | 36 | path: '/registration/yubikey/prove-possession', |
| 37 | 37 | name: 'ss_registration_yubikey_prove_possession', |
| 38 | - methods: ['GET','POST'], |
|
| 38 | + methods: ['GET', 'POST'], |
|
| 39 | 39 | )] |
| 40 | - public function provePossession(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|array |
|
| 40 | + public function provePossession(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse | array |
|
| 41 | 41 | { |
| 42 | 42 | $this->assertSecondFactorEnabled('yubikey'); |
| 43 | 43 | |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | #[Route( |
| 38 | 38 | path: '/registration/sms/send-challenge', |
| 39 | 39 | name: 'ss_registration_sms_send_challenge', |
| 40 | - methods: ['GET','POST'], |
|
| 40 | + methods: ['GET', 'POST'], |
|
| 41 | 41 | )] |
| 42 | - public function sendChallenge(Request $request): array|\Symfony\Component\HttpFoundation\RedirectResponse |
|
| 42 | + public function sendChallenge(Request $request): array | \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 43 | 43 | { |
| 44 | 44 | $this->assertSecondFactorEnabled('sms'); |
| 45 | 45 | |
@@ -84,9 +84,9 @@ discard block |
||
| 84 | 84 | #[Route( |
| 85 | 85 | path: '/registration/sms/prove-possession', |
| 86 | 86 | name: 'ss_registration_sms_prove_possession', |
| 87 | - methods: ['GET','POST'], |
|
| 87 | + methods: ['GET', 'POST'], |
|
| 88 | 88 | )] |
| 89 | - public function provePossession(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|array |
|
| 89 | + public function provePossession(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse | array |
|
| 90 | 90 | { |
| 91 | 91 | $this->assertSecondFactorEnabled('sms'); |
| 92 | 92 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | //methods: [GET] |
| 42 | 42 | //defaults: { _controller: SurfnetStepupSelfServiceSelfServiceBundle:EntryPoint:decideSecondFactorFlow } |
| 43 | 43 | |
| 44 | -#[Route(path: '/', name: 'ss_entry_point', methods:['GET'] )] |
|
| 44 | +#[Route(path: '/', name: 'ss_entry_point', methods:['GET'])] |
|
| 45 | 45 | public function decideSecondFactorFlow() : \Symfony\Component\HttpFoundation\RedirectResponse |
| 46 | 46 | { |
| 47 | 47 | $identity = $this->getIdentity(); |
@@ -49,7 +49,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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, |