@@ -216,7 +216,7 @@ public static function makeAuthentication(array $registrations, $appId)
216216 * @param array $requests An array of outstanding authentication requests
217217 * @param array <Registration> $registrations An array of current registrations
218218 * @param object $response A response from the authenticator
219- * @return Registration
219+ * @return \stdClass
220220 * @throws U2FException
221221 *
222222 * The Registration object returned on success contains an updated counter
@@ -255,7 +255,7 @@ public static function authenticate(array $requests, array $registrations, $resp
255255 throw new \InvalidArgumentException ('$requests of authenticate() method only accepts an array of objects. ' );
256256 }
257257
258- if ($ req ->keyHandle === $ response ->keyHandle && $ req ->challenge === $ decodedClient ->challenge ) {
258+ if ($ req ->keyHandle () === $ response ->keyHandle && $ req ->challenge () === $ decodedClient ->challenge ) {
259259 break ;
260260 }
261261
@@ -297,7 +297,7 @@ public static function authenticate(array $requests, array $registrations, $resp
297297
298298 // Build signature and data from response
299299 $ signData = static ::base64u_decode ($ response ->signatureData );
300- $ dataToVerify = hash ('sha256 ' , $ req ->appId , true );
300+ $ dataToVerify = hash ('sha256 ' , $ req ->appId () , true );
301301 $ dataToVerify .= substr ($ signData , 0 , 5 );
302302 $ dataToVerify .= hash ('sha256 ' , $ clientData , true );
303303 $ signature = substr ($ signData , 5 );
0 commit comments