@@ 24-59 (lines=36) @@ | ||
21 | use Surfnet\StepupMiddlewareClientBundle\Dto\Dto; |
|
22 | use Symfony\Component\Validator\Constraints as Assert; |
|
23 | ||
24 | class UnverifiedSecondFactor implements Dto |
|
25 | { |
|
26 | /** |
|
27 | * @Assert\NotBlank(message="middleware_client.dto.unverified_second_factor.id.must_not_be_blank") |
|
28 | * @Assert\Type(type="string", message="middleware_client.dto.unverified_second_factor.id.must_be_string") |
|
29 | * @var string |
|
30 | */ |
|
31 | public $id; |
|
32 | ||
33 | /** |
|
34 | * @Assert\NotBlank(message="middleware_client.dto.unverified_second_factor.type.must_not_be_blank") |
|
35 | * @Assert\Type(type="string", message="middleware_client.dto.unverified_second_factor.type.must_be_string") |
|
36 | * @var string |
|
37 | */ |
|
38 | public $type; |
|
39 | ||
40 | /** |
|
41 | * @Assert\NotBlank(message="middleware_client.dto.unverified_second_factor.second_factor_identifier.must_not_be_blank") |
|
42 | * @Assert\Type( |
|
43 | * type="string", |
|
44 | * message="middleware_client.dto.unverified_second_factor.second_factor_identifier.must_be_string" |
|
45 | * ) |
|
46 | * @var string |
|
47 | */ |
|
48 | public $secondFactorIdentifier; |
|
49 | ||
50 | public static function fromData(array $data) |
|
51 | { |
|
52 | $secondFactor = new self(); |
|
53 | $secondFactor->id = $data['id']; |
|
54 | $secondFactor->type = $data['type']; |
|
55 | $secondFactor->secondFactorIdentifier = $data['second_factor_identifier']; |
|
56 | ||
57 | return $secondFactor; |
|
58 | } |
|
59 | } |
|
60 |
@@ 24-59 (lines=36) @@ | ||
21 | use Surfnet\StepupMiddlewareClientBundle\Dto\Dto; |
|
22 | use Symfony\Component\Validator\Constraints as Assert; |
|
23 | ||
24 | class VettedSecondFactor implements Dto |
|
25 | { |
|
26 | /** |
|
27 | * @Assert\NotBlank(message="middleware_client.dto.vetted_second_factor.id.must_not_be_blank") |
|
28 | * @Assert\Type(type="string", message="middleware_client.dto.vetted_second_factor.id.must_be_string") |
|
29 | * @var string |
|
30 | */ |
|
31 | public $id; |
|
32 | ||
33 | /** |
|
34 | * @Assert\NotBlank(message="middleware_client.dto.vetted_second_factor.type.must_not_be_blank") |
|
35 | * @Assert\Type(type="string", message="middleware_client.dto.vetted_second_factor.type.must_be_string") |
|
36 | * @var string |
|
37 | */ |
|
38 | public $type; |
|
39 | ||
40 | /** |
|
41 | * @Assert\NotBlank(message="middleware_client.dto.vetted_second_factor.second_factor_identifier.must_not_be_blank") |
|
42 | * @Assert\Type( |
|
43 | * type="string", |
|
44 | * message="middleware_client.dto.vetted_second_factor.second_factor_identifier.must_be_string" |
|
45 | * ) |
|
46 | * @var string |
|
47 | */ |
|
48 | public $secondFactorIdentifier; |
|
49 | ||
50 | public static function fromData(array $data) |
|
51 | { |
|
52 | $secondFactor = new self(); |
|
53 | $secondFactor->id = $data['id']; |
|
54 | $secondFactor->type = $data['type']; |
|
55 | $secondFactor->secondFactorIdentifier = $data['second_factor_identifier']; |
|
56 | ||
57 | return $secondFactor; |
|
58 | } |
|
59 | } |
|
60 |