@@ -216,7 +216,7 @@ public static function makeAuthentication(array $registrations, $appId)
216
216
* @param array $requests An array of outstanding authentication requests
217
217
* @param array <Registration> $registrations An array of current registrations
218
218
* @param object $response A response from the authenticator
219
- * @return Registration
219
+ * @return \stdClass
220
220
* @throws U2FException
221
221
*
222
222
* The Registration object returned on success contains an updated counter
@@ -255,7 +255,7 @@ public static function authenticate(array $requests, array $registrations, $resp
255
255
throw new \InvalidArgumentException ('$requests of authenticate() method only accepts an array of objects. ' );
256
256
}
257
257
258
- if ($ req ->keyHandle === $ response ->keyHandle && $ req ->challenge === $ decodedClient ->challenge ) {
258
+ if ($ req ->keyHandle () === $ response ->keyHandle && $ req ->challenge () === $ decodedClient ->challenge ) {
259
259
break ;
260
260
}
261
261
@@ -297,7 +297,7 @@ public static function authenticate(array $requests, array $registrations, $resp
297
297
298
298
// Build signature and data from response
299
299
$ signData = static ::base64u_decode ($ response ->signatureData );
300
- $ dataToVerify = hash ('sha256 ' , $ req ->appId , true );
300
+ $ dataToVerify = hash ('sha256 ' , $ req ->appId () , true );
301
301
$ dataToVerify .= substr ($ signData , 0 , 5 );
302
302
$ dataToVerify .= hash ('sha256 ' , $ clientData , true );
303
303
$ signature = substr ($ signData , 5 );
0 commit comments