Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ CHANGE LOG
==========


## 5.1.1 (UPCOMING)

* Add sensitive parameter annotations for authentication tokens


## 5.1.0 (06/05/2026)

* Add PHP 8.5 support
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"php-http/httplug": "^2.4.1",
"psr/http-client-implementation": "^1.0",
"psr/http-factory-implementation": "^1.0",
"psr/http-message": "^1.1 || ^2.0"
"psr/http-message": "^1.1 || ^2.0",
"symfony/polyfill-php82": "^1.27"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function vpc(): Vpc
return new Vpc($this);
}

public function authenticate(string $token): void
public function authenticate(#[\SensitiveParameter] string $token): void
{
$this->getHttpClientBuilder()->addPlugin(new Authentication($token));
}
Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient/Plugin/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class Authentication implements Plugin
*/
private readonly string $header;

public function __construct(string $token)
public function __construct(#[\SensitiveParameter] string $token)
{
$this->header = \sprintf('Bearer %s', $token);
}
Expand Down