1 | <?php |
||
46 | class SignRequest implements SignRequestInterface, JsonSerializable |
||
47 | { |
||
48 | /** |
||
49 | * Protocol version |
||
50 | * @var string |
||
51 | */ |
||
52 | private $version = U2F_interface::U2F_VERSION; |
||
53 | |||
54 | /** |
||
55 | * Authentication challenge |
||
56 | * @var string |
||
57 | */ |
||
58 | private $challenge; |
||
59 | |||
60 | /** |
||
61 | * Key handle of a registered authenticator |
||
62 | * @var string |
||
63 | */ |
||
64 | private $keyHandle; |
||
65 | |||
66 | /** |
||
67 | * Application id |
||
68 | * @var string |
||
69 | */ |
||
70 | private $appId; |
||
71 | |||
72 | /** |
||
73 | * SignRequest constructor. |
||
74 | * @param string $challenge |
||
75 | * @param string $keyHandle |
||
76 | * @param string $appId |
||
77 | */ |
||
78 | public function __construct($challenge, $keyHandle, $appId) |
||
84 | |||
85 | /** |
||
86 | * @return string |
||
87 | */ |
||
88 | public function getVersion() |
||
92 | |||
93 | /** |
||
94 | * @param string $version |
||
95 | * @return SignRequestInterface |
||
96 | */ |
||
97 | public function setVersion($version) |
||
102 | |||
103 | /** |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getChallenge() |
||
110 | |||
111 | /** |
||
112 | * @param string $challenge |
||
113 | * @return SignRequestInterface |
||
114 | */ |
||
115 | public function setChallenge($challenge) |
||
120 | |||
121 | /** |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getKeyHandle() |
||
128 | |||
129 | /** |
||
130 | * @param string $keyHandle |
||
131 | * @return SignRequestInterface |
||
132 | */ |
||
133 | public function setKeyHandle($keyHandle) |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getAppId() |
||
146 | |||
147 | /** |
||
148 | * @param string $appId |
||
149 | * @return SignRequestInterface |
||
150 | */ |
||
151 | public function setAppId($appId) |
||
156 | |||
157 | /** |
||
158 | * Specify data which should be serialized to JSON |
||
159 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
160 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
161 | * which is a value of any type other than a resource. |
||
162 | * @since 5.4.0 |
||
163 | */ |
||
164 | function jsonSerialize() |
||
173 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.