Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set useragent #370

Merged
merged 3 commits into from
May 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Set useragent
  • Loading branch information
ricklambrechts committed May 4, 2023

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit e6494514e6d893ee6f4d76b1526b9f3c643df4ac
6 changes: 6 additions & 0 deletions src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
@@ -1367,6 +1367,7 @@ protected function fetchURL(string $url, string $post_body = null, array $header
// Allows to keep the POST method even after redirect
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_body);
curl_setopt($ch, CURLOPT_USERAGENT, $this->getUserAgent());

// Default content type is form encoded
$content_type = 'application/x-www-form-urlencoded';
@@ -2058,4 +2059,9 @@ public function supportsAuthMethod(string $auth_method, array $token_endpoint_au

return in_array($auth_method, $token_endpoint_auth_methods_supported, true);
}

protected function getUserAgent(): string
{
return "";
}
}