Skip to content

Commit

Permalink
Repair the SelfVet ACS Controller
Browse files Browse the repository at this point in the history
The controller was not autoconfigurable fixed that by adding a service
definition.

And the MW client bundle command: SelfVetSecondFactorCommand was not
configured correctly. A none existant field was set on it. Repaired that
  • Loading branch information
MKodde committed Apr 16, 2024
1 parent 35d9c68 commit 1b382e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function consumeSelfVetAssertion(Request $httpRequest, string $secondFact
$samlLogger->error(
sprintf(
'Expected a response to the request with ID "%s", but the SAMLResponse was a response to a different request',
$initiatedRequestId
$initiatedRequestId->requestId()
)
);
throw new AuthenticationException('Unexpected InResponseTo in SAMLResponse');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,21 @@ services:
- '@surfnet_saml.http.redirect_binding'
- '@surfnet_saml.http.post_binding'
- '@surfnet_saml.hosted.service_provider'
- '@self_service.second_factor_test_idp'
- '@surfnet_saml.remote.idp'
- '@surfnet_saml.logger'
- '@logger'

Surfnet\StepupSelfService\SelfServiceBundle\Controller\SelfVet\SelfVetConsumeController:
arguments:
- "@logger"
- "@surfnet_stepup_self_service_self_service.service.second_factor"
- "@self_service.service.self_vet_marshaller"
- "@surfnet_saml.hosted.service_provider"
- '@surfnet_saml.remote.idp'
- "@surfnet_saml.http.post_binding"
- "@surfnet_saml.logger"
- "@request_stack"

surfnet_stepup_self_service_self_service.service.command:
class: Surfnet\StepupSelfService\SelfServiceBundle\Service\CommandService
arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function selfVet(SelfVetCommand $command): bool
$apiCommand->secondFactorId = $command->secondFactor->secondFactorIdentifier;
$apiCommand->secondFactorType = $command->secondFactor->type;
$apiCommand->authorityId = $command->identity->id;
$apiCommand->authoringSecondFactorLoa = $command->authoringLoa;
$apiCommand->authoringSecondFactorIdentifier = $command->authoringLoa;

$result = $this->commandService->execute($apiCommand);
return $result->isSuccessful();
Expand Down

0 comments on commit 1b382e7

Please sign in to comment.