aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-21 13:36:33 -0800
committerzotlabs <mike@macgirvin.com>2017-12-21 13:36:33 -0800
commite7143a265ac97b31a8e0ada85b876ba76c911a3d (patch)
treedfa42a02359701960f525d10a22e1ebca5b82873 /vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php
parent684b572aa8005479f3eb219fc526c812c801ca76 (diff)
parent9c72963d7ce3c60709755edb5d40cb0b06b29cda (diff)
downloadvolse-hubzilla-e7143a265ac97b31a8e0ada85b876ba76c911a3d.tar.gz
volse-hubzilla-e7143a265ac97b31a8e0ada85b876ba76c911a3d.tar.bz2
volse-hubzilla-e7143a265ac97b31a8e0ada85b876ba76c911a3d.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php')
-rw-r--r--vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php b/vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php
index 52aeb4be5..b92c73cda 100644
--- a/vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php
+++ b/vendor/bshaffer/oauth2-server-php/src/OAuth2/ResponseType/AuthorizationCode.php
@@ -5,7 +5,6 @@ namespace OAuth2\ResponseType;
use OAuth2\Storage\AuthorizationCodeInterface as AuthorizationCodeStorageInterface;
/**
- *
* @author Brent Shaffer <bshafs at gmail dot com>
*/
class AuthorizationCode implements AuthorizationCodeInterface
@@ -85,7 +84,9 @@ class AuthorizationCode implements AuthorizationCodeInterface
protected function generateAuthorizationCode()
{
$tokenLen = 40;
- if (function_exists('openssl_random_pseudo_bytes')) {
+ if (function_exists('random_bytes')) {
+ $randomData = random_bytes(100);
+ } elseif (function_exists('openssl_random_pseudo_bytes')) {
$randomData = openssl_random_pseudo_bytes(100);
} elseif (function_exists('mcrypt_create_iv')) {
$randomData = mcrypt_create_iv(100, MCRYPT_DEV_URANDOM);