Skip to content
Open
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
8 changes: 6 additions & 2 deletions src/BigBlueButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ class BigBlueButton
/**
* @param null|array<string, mixed> $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 '
Expand Down
14 changes: 10 additions & 4 deletions src/Util/UrlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down