We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2afb7b8 commit 71ebc19Copy full SHA for 71ebc19
src/RegistrationRequest.php
@@ -8,7 +8,7 @@
8
namespace Samyoul\U2F\U2FServer;
9
10
11
-class RegistrationRequest
+class RegistrationRequest implements \JsonSerializable
12
{
13
/** Protocol version */
14
protected $version = U2FServer::VERSION;
@@ -44,9 +44,13 @@ public function appId()
44
return $this->appId;
45
}
46
47
- public function __toString()
+ public function jsonSerialize()
48
49
- return json_encode($this);
+ return [
50
+ 'version' => $this->version,
51
+ 'challenge' => $this->challenge,
52
+ 'appId' => $this->appId,
53
+ ];
54
55
56
0 commit comments