Skip to content

Commit d81f8be

Browse files
committed
Add #[SensitiveParameter] attribute.
1 parent 4df5c01 commit d81f8be

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/BigBlueButton.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ class BigBlueButton
9292
/**
9393
* @param null|array<string, mixed> $opts
9494
*/
95-
public function __construct(?string $baseUrl = null, ?string $secret = null, ?array $opts = [])
95+
public function __construct(
96+
?string $baseUrl = null,
97+
#[\SensitiveParameter]
98+
?string $secret = null,
99+
?array $opts = [])
96100
{
97101
// Provide an early error message if configuration is wrong
98102
if (is_null($baseUrl) && false === getenv('BBB_SERVER_BASE_URL')) {

src/Util/UrlBuilder.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,22 @@ class UrlBuilder
4747

4848
private string $baseUrl;
4949

50-
public function __construct(string $secret, string $baseUrl, HashingAlgorithm $hashingAlgorithm)
51-
{
50+
public function __construct(
51+
#[\SensitiveParameter]
52+
string $secret,
53+
string $baseUrl,
54+
HashingAlgorithm $hashingAlgorithm,
55+
) {
5256
$this->setSecret($secret);
5357
$this->setBaseUrl($baseUrl);
5458
$this->setHashingAlgorithm($hashingAlgorithm);
5559
}
5660

5761
// Getters & Setters
58-
public function setSecret(string $secret): self
59-
{
62+
public function setSecret(
63+
#[\SensitiveParameter]
64+
string $secret,
65+
): self {
6066
$this->secret = $secret;
6167

6268
return $this;

0 commit comments

Comments
 (0)