Skip to content

Commit

Permalink
Add scope header in OAuth2 (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbolliger authored Oct 27, 2024
1 parent c3503ee commit 13a228d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Provider/CustomOAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ public function getUserProfile()
$profileUrl .= (strpos($profileUrl, '?') !== false ? '&' : '?') . 'fields=' . implode(',', $profileFields);
}

$response = $this->apiRequest($profileUrl);
$response = $this->apiRequest(
$profileUrl,
'GET', // method,
[], // parameters
["X-Scope" => $this->config->get('scope')] // headers
);
if (isset($response->ocs->data)) {
$response = $response->ocs->data;
}
Expand Down

0 comments on commit 13a228d

Please sign in to comment.