Skip to content

[SHB-20993]: php-webfleet - migrate to http basic auth#3

Merged
Iandenh merged 3 commits into
masterfrom
shb-20993
May 29, 2026
Merged

[SHB-20993]: php-webfleet - migrate to http basic auth#3
Iandenh merged 3 commits into
masterfrom
shb-20993

Conversation

@Iandenh
Copy link
Copy Markdown

@Iandenh Iandenh commented May 28, 2026

Webfleet deprecated username/password in the request URL; the
URL-based authentication is removed end of June 2026.

Credentials are now base64-encoded into an Authorization: Basic
header per RFC 7617 and unconditionally stripped from the query
string. account, apikey and sessiontoken remain query parameters.

Also drops a redundant normalizeHeaders() call in TinyCurlClient
that doubled the Authorization prefix (vendor Request::fetch
normalizes once, the adapter was normalizing again).

Bumps the PHP requirement to 7.1 for a nullable return type.

Webfleet deprecated username/password in the request URL; the
URL-based authentication is removed end of June 2026.

Credentials are now base64-encoded into an Authorization: Basic
header per RFC 7617 and unconditionally stripped from the query
string. account, apikey and sessiontoken remain query parameters.

Also drops a redundant normalizeHeaders() call in TinyCurlClient
that doubled the Authorization prefix (vendor Request::fetch
normalizes once, the adapter was normalizing again).

Bumps the PHP requirement to 7.1 for a nullable return type.
@Iandenh Iandenh marked this pull request as ready for review May 29, 2026 11:17
@Iandenh Iandenh requested a review from Copilot May 29, 2026 11:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates php-webfleet to comply with Webfleet’s upcoming deprecation of URL-based username/password authentication by moving credentials to an RFC 7617 HTTP Basic Authorization header and stripping credentials from the query string. It also removes a redundant header normalization step that could corrupt the Authorization header, and bumps the minimum PHP version to support a nullable return type.

Changes:

  • Add WebfleetOptions::getBasicAuthHeader() to generate an RFC 7617 Basic auth header value.
  • Strip username/password from request query params and send credentials via Authorization: Basic ... header.
  • Stop double-normalizing headers in TinyCurlClient and bump minimum PHP to 7.1 (README + composer).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/WebfleetOptions.php Adds helper to build a Basic auth header from configured credentials.
src/WebfleetEndpoint.php Removes URL credentials from query parameters and injects an Authorization header into requests.
src/HTTP/TinyCurlClient.php Avoids double header normalization that could break header formatting.
README.md Updates documented PHP requirement to 7.1+.
composer.json Updates PHP requirement to >=7.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/WebfleetOptions.php Outdated
Comment thread composer.json
@Iandenh Iandenh requested review from odyriavin and sb-everbeek May 29, 2026 11:56
@Iandenh Iandenh merged commit 0b61438 into master May 29, 2026
@Iandenh Iandenh deleted the shb-20993 branch May 29, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants