@@ -106,7 +106,7 @@ public function registerUser($username, $email, $language = "en", $picture = '')
106106 "picture " => $ picture // (optionnal) full url only
107107 );
108108
109- $ res = $ client ->request ('POST ' , $ this ->getDir () . '/pub/sso/registerUser/pubkey/ ' . $ this ->getGcPublic () . '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
109+ $ res = $ client ->request ('POST ' , $ this ->getDir () . '/pub/sso/registerUser/pubkey/ ' . $ this ->getGcPublic () . '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
110110
111111 if ($ res ->getStatusCode () == "200 " ) {
112112 return $ res ->getBody ();
@@ -131,7 +131,7 @@ public function loginUser($gc_id)
131131 "gc_id " => $ gc_id
132132 );
133133
134- $ res = $ client ->request ('POST ' , $ this ->getDir () . '/pub/sso/loginUser/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
134+ $ res = $ client ->request ('POST ' , $ this ->getDir () . '/pub/sso/loginUser/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
135135
136136 return $ res ->getBody ();
137137 }
@@ -152,7 +152,7 @@ public function getUser($gc_id)
152152 "gc_id " => $ gc_id
153153 );
154154
155- $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/sso/getUser/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
155+ $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/sso/getUser/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
156156
157157 return $ res ->getBody ();
158158 }
@@ -189,7 +189,7 @@ public function updateUser($gc_id, $username, $email, $language, $picture)
189189 "picture " => $ picture
190190 );
191191
192- $ res = $ client ->request ('PUT ' , $ this ->getDir () . '/pub/sso/updateUser/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
192+ $ res = $ client ->request ('PUT ' , $ this ->getDir () . '/pub/sso/updateUser/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
193193
194194 return $ res ->getBody ();
195195 }
@@ -207,7 +207,10 @@ public function deleteUser($gc_id)
207207 {
208208 $ client = new Client ();
209209
210- $ res = $ client ->request ('DELETE ' , $ this ->getDir () . '/pub/sso/deleteProfileByGcId/pubkey/ ' . $ this ->getGcPublic (). '/key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
210+ $ data = array (
211+ "gc_id " => $ gc_id );
212+
213+ $ res = $ client ->request ('DELETE ' , $ this ->getDir () . '/pub/sso/deleteProfileByGcId/pubkey/ ' . $ this ->getGcPublic (). '?key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
211214
212215 return $ res ->getBody ();
213216 }
@@ -229,7 +232,7 @@ public function countComments($url, $uid='') {
229232 "uid " => $ uid
230233 );
231234
232- $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/sso/numberOfComments/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
235+ $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/sso/numberOfComments/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
233236
234237 return $ res ->getBody ();
235238 }
@@ -250,7 +253,7 @@ public function getThreadJsonLdFormat($url, $uid='') {
250253 "uid " => $ uid
251254 );
252255
253- $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/sso/thread-jsonld/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
256+ $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/sso/thread-jsonld/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
254257
255258 return $ res ->getBody ();
256259 }
@@ -264,7 +267,7 @@ public function getThreadJsonLdFormat($url, $uid='') {
264267 public function exportComments () {
265268 $ client = new Client ();
266269
267- $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/export-comments/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ('key ' ), ['http_errors ' => false , 'timeout ' => 5 ]);
270+ $ res = $ client ->request ('GET ' , $ this ->getDir () . '/pub/export-comments/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ('key ' ), ['http_errors ' => false , 'timeout ' => 5 ]);
268271
269272 return $ res ->getBody ();
270273 }
@@ -282,7 +285,7 @@ public function exportConfirmComments(Array $commentIds) {
282285
283286 $ data = $ commentIds ;
284287
285- $ res = $ client ->request ('POST ' , $ this ->getDir () . '/pub/export-comments/pubkey/ ' . $ this ->getGcPublic (). '/ key/ ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
288+ $ res = $ client ->request ('POST ' , $ this ->getDir () . '/pub/export-comments/pubkey/ ' . $ this ->getGcPublic (). '? key= ' . $ this ->generateSsoData ($ data ), ['http_errors ' => false , 'timeout ' => 5 ]);
286289
287290 return $ res ->getBody ();
288291 }
0 commit comments