1 | <?php |
||
23 | class YubikeyOtpVerificationResult |
||
24 | { |
||
25 | const RESULT_PUBLIC_ID_MATCHED = 0; |
||
26 | const RESULT_PUBLIC_ID_DID_NOT_MATCH = 1; |
||
27 | const RESULT_OTP_VERIFICATION_FAILED = 2; |
||
28 | |||
29 | /** |
||
30 | * @var \Surfnet\StepupBundle\Value\YubikeyPublicId|null |
||
31 | */ |
||
32 | private $publicId; |
||
33 | |||
34 | /** |
||
35 | * @var int One of the RESULT constants. |
||
36 | */ |
||
37 | private $result; |
||
38 | |||
39 | /** |
||
40 | * @param int $result |
||
41 | * @param YubikeyPublicId|null $publicId |
||
42 | * @throws DomainException When $result is not one of the RESULT constants. |
||
43 | * @throws InvalidArgumentException When the public ID is not a string. |
||
44 | */ |
||
45 | public function __construct($result, YubikeyPublicId $publicId = null) |
||
60 | |||
61 | public function didPublicIdMatch() |
||
65 | |||
66 | public function didOtpVerificationFail() |
||
70 | |||
71 | /** |
||
72 | * @return YubikeyPublicId|null |
||
73 | */ |
||
74 | public function getPublicId() |
||
78 | } |
||
79 |