diff --git a/src/Illuminate/Cache/CacheManager.php b/src/Illuminate/Cache/CacheManager.php index 95a76f69eab3..e5c9049997d0 100755 --- a/src/Illuminate/Cache/CacheManager.php +++ b/src/Illuminate/Cache/CacheManager.php @@ -260,10 +260,14 @@ protected function newDynamodbClient(array $config) if (! empty($config['key']) && ! empty($config['secret'])) { $dynamoConfig['credentials'] = Arr::only( - $config, ['key', 'secret', 'token'] + $config, ['key', 'secret'] ); } + if (! empty($config['token'])) { + $dynamoConfig['credentials']['token'] = $config['token']; + } + return new DynamoDbClient($dynamoConfig); } diff --git a/src/Illuminate/Filesystem/FilesystemManager.php b/src/Illuminate/Filesystem/FilesystemManager.php index 263ba3db040f..abc146e14631 100644 --- a/src/Illuminate/Filesystem/FilesystemManager.php +++ b/src/Illuminate/Filesystem/FilesystemManager.php @@ -263,7 +263,11 @@ protected function formatS3Config(array $config) $config += ['version' => 'latest']; if (! empty($config['key']) && ! empty($config['secret'])) { - $config['credentials'] = Arr::only($config, ['key', 'secret', 'token']); + $config['credentials'] = Arr::only($config, ['key', 'secret']); + } + + if (! empty($config['token'])) { + $config['credentials']['token'] = $config['token']; } return Arr::except($config, ['token']);