diff --git a/src/BigBlueButton.php b/src/BigBlueButton.php index 24ebec9c..dc026624 100644 --- a/src/BigBlueButton.php +++ b/src/BigBlueButton.php @@ -92,8 +92,12 @@ class BigBlueButton /** * @param null|array $opts */ - public function __construct(?string $baseUrl = null, ?string $secret = null, ?array $opts = []) - { + public function __construct( + ?string $baseUrl = null, + #[\SensitiveParameter] + ?string $secret = null, + ?array $opts = [], + ) { // Provide an early error message if configuration is wrong if (is_null($baseUrl) && false === getenv('BBB_SERVER_BASE_URL')) { throw new \RuntimeException('No BBB-Server-Url found! Please provide it either in constructor ' diff --git a/src/Util/UrlBuilder.php b/src/Util/UrlBuilder.php index 5a537af6..0ce24505 100644 --- a/src/Util/UrlBuilder.php +++ b/src/Util/UrlBuilder.php @@ -47,16 +47,22 @@ class UrlBuilder private string $baseUrl; - public function __construct(string $secret, string $baseUrl, HashingAlgorithm $hashingAlgorithm) - { + public function __construct( + #[\SensitiveParameter] + string $secret, + string $baseUrl, + HashingAlgorithm $hashingAlgorithm, + ) { $this->setSecret($secret); $this->setBaseUrl($baseUrl); $this->setHashingAlgorithm($hashingAlgorithm); } // Getters & Setters - public function setSecret(string $secret): self - { + public function setSecret( + #[\SensitiveParameter] + string $secret, + ): self { $this->secret = $secret; return $this;