File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -137,12 +137,12 @@ private function completeAuth():void {
137
137
$ secretSessionIv = $ token ->getSecretIv ();
138
138
$ encrypted = new EncryptedMessage ($ queryData , $ secretSessionIv );
139
139
$ key = new Key ($ this ->clientKey );
140
- $ decrypt = $ encrypted ->decrypt ($ key );
141
- parse_str ( $ decrypt , $ data );
140
+ $ decrypted = $ encrypted ->decrypt ($ key );
141
+ $ data = json_decode ( $ decrypted );
142
142
$ userData = new UserResponseData (
143
- $ data[ "id " ] ,
144
- $ data[ "email " ] ,
145
- $ data[ "kvp " ] ?? [],
143
+ $ data->{ "id " } ,
144
+ $ data->{ "email " } ,
145
+ $ data->{ "kvp " } ?? [],
146
146
);
147
147
148
148
$ this ->session ->set (
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ public function testCompleteAuthNotLoggedIn() {
200
200
public function testCompleteAuth () {
201
201
$ keyBytes = str_repeat ("0 " , SODIUM_CRYPTO_SECRETBOX_KEYBYTES );
202
202
$ ivBytes = str_repeat ("1 " , SODIUM_CRYPTO_SECRETBOX_NONCEBYTES );
203
- $ plainTextMessage = http_build_query ([
203
+ $ plainTextMessage = json_encode ([
204
204
"id " => 123 ,
205
205
206
206
]);
You can’t perform that action at this time.
0 commit comments