Skip to content

Commit

Permalink
Merge pull request #155 from OpenConext/bugfix/verify-sms-form-issue
Browse files Browse the repository at this point in the history
Prevent form loading issue
  • Loading branch information
MKodde authored Sep 17, 2018
2 parents 97d640e + adcedc0 commit b7c8d72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
use Surfnet\StepupSelfService\SelfServiceBundle\Command\VerifySmsChallengeCommand;
use Surfnet\StepupSelfService\SelfServiceBundle\Controller\Controller;
use Surfnet\StepupSelfService\SelfServiceBundle\Form\Type\SendSmsChallengeType;
use Surfnet\StepupSelfService\SelfServiceBundle\Form\Type\VerifySmsChallengeType;
use Surfnet\StepupSelfService\SelfServiceBundle\Service\SmsSecondFactorService;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request;

class SmsController extends Controller
Expand Down Expand Up @@ -95,7 +95,7 @@ public function provePossessionAction(Request $request)
$command = new VerifySmsChallengeCommand();
$command->identity = $identity->id;

$form = $this->createForm('ss_verify_sms_challenge', $command)->handleRequest($request);
$form = $this->createForm(VerifySmsChallengeType::class, $command)->handleRequest($request);

if ($form->isValid()) {
$result = $service->provePossession($command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function provePossessionAction(Request $request)

$form = $this
->createForm(
'surfnet_stepup_u2f_register_device',
RegisterDeviceType::class,
$registerResponse,
[
'register_request' => $registerRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Surfnet\StepupSelfService\SelfServiceBundle\Command\RevokeCommand;
use Surfnet\StepupSelfService\SelfServiceBundle\Form\Type\RevokeSecondFactorType;
use Surfnet\StepupSelfService\SelfServiceBundle\Service\SecondFactorService;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -109,7 +110,7 @@ public function revokeAction(Request $request, $state, $secondFactorId)
$command->identity = $identity;
$command->secondFactor = $secondFactor;

$form = $this->createForm('ss_revoke_second_factor', $command)->handleRequest($request);
$form = $this->createForm(RevokeSecondFactorType::class, $command)->handleRequest($request);

if ($form->isValid()) {
/** @var FlashBagInterface $flashBag */
Expand Down

0 comments on commit b7c8d72

Please sign in to comment.