Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 70b60fe

Browse files
committed
Remove references to an injectable CSPRNG in the docs
1 parent 804a48b commit 70b60fe

File tree

4 files changed

+1
-85
lines changed

4 files changed

+1
-85
lines changed

docs/reference.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,3 @@ You can overwrite certain functionality of the SDK by coding to an interface and
9191
| `Facebook\Http\GraphRawResponse` | An entity that is returned from an instance of a `FacebookHttpClientInterface` that represents a raw HTTP response from the Graph API. |
9292
| [`Facebook\PersistentData\PersistentDataInterface`](reference/PersistentDataInterface.md) | An interface to code your own persistent data storage implementation. |
9393
| [`Facebook\Url\UrlDetectionInterface`](reference/UrlDetectionInterface.md) | An interface to code your own URL detection logic. |
94-
| [`Facebook\PseudoRandomString\ PseudoRandomStringGeneratorInterface`](reference/PseudoRandomStringGeneratorInterface.md) | An interface to code your own cryptographically secure pseudo-random string generator. |

docs/reference/Facebook.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ $fb = new Facebook\Facebook([
5252
'http_client_handler' => 'guzzle',
5353
'persistent_data_handler' => 'memory',
5454
'url_detection_handler' => new MyUrlDetectionHandler(),
55-
'pseudo_random_string_generator' => new MyPseudoRandomStringGenerator(),
5655
]);
5756
```
5857

@@ -116,29 +115,6 @@ $fb = new Facebook([
116115

117116
If any other value is provided an `InvalidArgumentException` will be thrown.
118117

119-
### `pseudo_random_string_generator`
120-
Allows you to overwrite the default cryptographically secure pseudo-random string generator.
121-
122-
Generating random strings in PHP is easy but generating _cryptographically secure_ random strings is another matter. By default the SDK will attempt to detect a suitable to cryptographically secure random string generator for you. If a cryptographically secure method cannot be detected, a `Facebook\Exceptions\FacebookSDKException` will be thrown.
123-
124-
You can force a specific implementation of the CSPRSG's provided in the SDK by setting `pseudo_random_string_generator` to one of the following methods: `mcrypt`, `openssl` and `urandom`.
125-
126-
```php
127-
$fb = new Facebook([
128-
'pseudo_random_string_generator' => 'openssl',
129-
]);
130-
```
131-
132-
You can write your own CSPRSG that implements the [`Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface`](PseudoRandomStringGeneratorInterface.md) and set the value of `pseudo_random_string_generator` to an instance of your custom generator.
133-
134-
```php
135-
$fb = new Facebook([
136-
'pseudo_random_string_generator' => new MyPseudoRandomStringGenerator(),
137-
]);
138-
```
139-
140-
If any other value is provided an `InvalidArgumentException` will be thrown.
141-
142118
## Environment variables fallback
143119

144120
The only required configuration options are `app_id` and `app_secret`. However, the SDK will look to environment variables for the app ID and app secret.

docs/reference/FacebookRedirectLoginHelper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Most modern web frameworks have custom session handlers that allow you to manage
126126

127127
### CSPRNG
128128

129-
The CSRF value that the `getLoginUrl()`, `getReRequestUrl()`, and `getReAuthenticationUrl()` methods generate are all _cryptographically secure_ random strings. PHP's native support of CSPRNG's is spotty at best. The PHP SDK goes to great lengths to to detect a suitable CSPRNG but in rare cases, it might not find a suitable one. The [`PseudoRandomStringGeneratorInterface`](PseudoRandomStringGeneratorInterface.md) allows you to inject your own custom CSPRNG.
129+
The CSRF value that the `getLoginUrl()`, `getReRequestUrl()`, and `getReAuthenticationUrl()` methods generate are all _cryptographically secure_ random strings. To generate these tokens the PHP SDK uses the [CSPRNG functions in PHP 7](http://php.net/csprng) and the [paragonie/random_compat](https://github.com/paragonie/random_compat) polyfill for PHP 5.6.
130130

131131

132132
### URL detection

docs/reference/PseudoRandomStringGeneratorInterface.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)