Skip to content

Commit df3da48

Browse files
committed
Renamed salt to secret.
1 parent b1003b0 commit df3da48

6 files changed

Lines changed: 15 additions & 14 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ matrix:
2121

2222
env:
2323
global:
24-
- BBB_SECURITY_SALT=8cd8ef52e8e101574e400365b55e11a6
24+
- BBB_SECRET=8cd8ef52e8e101574e400365b55e11a6
2525
- BBB_SERVER_BASE_URL=http://test-install.blindsidenetworks.com/bigbluebutton/
2626

2727
before_script:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@ The official and easy to use **BigBlueButton API for PHP**, makes easy for devel
2323
- mbstring library installed.
2424
- Xml library installed.
2525

26-
BigBlueButton API for PHP is also tested to work with HHVM and fully compatible with PHP 7.1.
26+
BigBlueButton API for PHP is also tested to work with HHVM and fully compatible with PHP 7.0 and above.
2727

2828

2929
## Installation
3030

3131
**bigbluebutton-api-php** can be installed via [Composer][composer] CLI
3232

3333
```
34-
composer require bigbluebutton/bigbluebutton-api-php:dev-master
34+
composer require bigbluebutton/bigbluebutton-api-php:~2.0.0
3535
```
3636

3737
or by editing [Composer][composer].json
3838

3939
```json
4040
{
4141
"require": {
42-
"bigbluebutton/bigbluebutton-api-php": "dev-master"
42+
"bigbluebutton/bigbluebutton-api-php": "~2.0.0"
4343
}
4444
}
4545
```
4646

4747
## Usage
4848

49-
You should have environment variables ```BBB_SECURITY_SALT``` and ```BBB_SERVER_BASE_URL``` defined in your sever.
49+
You should have environment variables ```BBB_SECRET``` and ```BBB_SERVER_BASE_URL``` defined in your sever.
5050
\*if you are using Laravel you can add it in your .env
5151

5252
The you will be able to call BigBlueButton API of your server. A simple usage example for create meeting looks like:

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
syntaxCheck="false">
1414

1515
<php>
16-
<!-- Specify the value of your BigBlueButton security salt -->
17-
<env name="BBB_SECURITY_SALT" value="8cd8ef52e8e101574e400365b55e11a6"/>
16+
<!-- Specify the value of your BigBlueButton secret -->
17+
<env name="BBB_SECRET" value="8cd8ef52e8e101574e400365b55e11a6"/>
1818
<!-- Specify the Server Base URL of your BigBlueButton -->
1919
<env name="BBB_SERVER_BASE_URL" value="http://test-install.blindsidenetworks.com/bigbluebutton/"/>
2020
</php>

src/BigBlueButton.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,16 @@
5050
*/
5151
class BigBlueButton
5252
{
53-
protected $securitySalt;
53+
protected $securitySecret;
5454
protected $bbbServerBaseUrl;
5555
protected $urlBuilder;
5656

5757
public function __construct()
5858
{
59-
$this->securitySalt = getenv('BBB_SECURITY_SALT');
59+
// Keeping backward compatibility with older deployed versions
60+
$this->securitySecret = (getenv('BBB_SECURITY_SALT') === false) ? getenv('BBB_SECRET') : $this->securitySecret = getenv('BBB_SECURITY_SALT');
6061
$this->bbbServerBaseUrl = getenv('BBB_SERVER_BASE_URL');
61-
$this->urlBuilder = new UrlBuilder($this->securitySalt, $this->bbbServerBaseUrl);
62+
$this->urlBuilder = new UrlBuilder($this->securitySecret, $this->bbbServerBaseUrl);
6263
}
6364

6465
/**

src/Util/UrlBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class UrlBuilder
3636
/**
3737
* UrlBuilder constructor.
3838
*
39-
* @param $salt
39+
* @param $secret
4040
* @param $serverBaseUrl
4141
*/
42-
public function __construct($salt, $serverBaseUrl)
42+
public function __construct($secret, $serverBaseUrl)
4343
{
44-
$this->securitySalt = $salt;
44+
$this->securitySalt = $secret;
4545
$this->bbbServerBaseUrl = $serverBaseUrl;
4646
}
4747

tests/BigBlueButtonTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function setUp()
4444
{
4545
parent::setUp();
4646

47-
foreach (['BBB_SECURITY_SALT', 'BBB_SERVER_BASE_URL'] as $k) {
47+
foreach (['BBB_SECRET', 'BBB_SERVER_BASE_URL'] as $k) {
4848
if (!getenv($k)) {
4949
$this->fail('$_SERVER[\'' . $k . '\'] not set in '
5050
. 'phpunit.xml');

0 commit comments

Comments
 (0)