Skip to content

Commit

Permalink
tweak to code exchage request
Browse files Browse the repository at this point in the history
  • Loading branch information
tamw-wnet committed Sep 16, 2024
1 parent feb6c38 commit 8f4f0fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions classes/class-PMSSO-Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,15 @@ private function get_code_response($code='', $code_verifier=''){
$url = $this->oauthroot . 'login/token/';
$postfields = array(
'code' => $code,
'redirect_uri' => $this->redirect_uri,
'client_id' => $this->client_id,
'grant_type' => 'authorization_code',
'code_verifier' => $code_verifier
);
$requestbody=http_build_query($postfields);
$ch = $this->build_curl_handle($url);
//construct the curl request
error_log("code response request to $url uses " . json_encode($postfields));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestbody);
$response_json = curl_exec($ch);
$info = curl_getinfo($ch);
$errors = curl_error($ch);
Expand Down

0 comments on commit 8f4f0fe

Please sign in to comment.