From b9380b2c3a458387335bc4f818b5b6afd618bac9 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Fri, 16 Mar 2018 10:50:04 -0500 Subject: [PATCH] Dependencies for captcha #212 --- composer.json | 3 +- composer.lock | 91 ++++++++++++++++++++++----- config/app.php | 2 + config/captcha.php | 9 +++ resources/stubs/installer/config.stub | 10 +++ 5 files changed, 98 insertions(+), 17 deletions(-) create mode 100644 config/captcha.php diff --git a/composer.json b/composer.json index d1ca5069..c2271b9a 100755 --- a/composer.json +++ b/composer.json @@ -37,7 +37,8 @@ "php-units-of-measure/php-units-of-measure": "2.1.x", "markrogoyski/math-php": "^0.38.0", "akaunting/money": "^1.0", - "igaster/laravel-theme": "^2.0" + "igaster/laravel-theme": "^2.0", + "anhskohbo/no-captcha": "^3.0" }, "require-dev": { "phpunit/phpunit": "~7.0", diff --git a/composer.lock b/composer.lock index 8447c6ae..b72b4e23 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "e7e949a827f8cef058e1ea7e3db83c5f", + "content-hash": "55cf432213722ec0f7ad7f80a4edc648", "packages": [ { "name": "akaunting/money", @@ -67,6 +67,65 @@ ], "time": "2017-12-09T07:25:06+00:00" }, + { + "name": "anhskohbo/no-captcha", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/anhskohbo/no-captcha.git", + "reference": "f6c3a006b8c74f692d232d861c3e104621f50dcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/anhskohbo/no-captcha/zipball/f6c3a006b8c74f692d232d861c3e104621f50dcc", + "reference": "f6c3a006b8c74f692d232d861c3e104621f50dcc", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.2", + "illuminate/support": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "php": ">=5.5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Anhskohbo\\NoCaptcha\\NoCaptchaServiceProvider" + ], + "aliases": { + "NoCaptcha": "Anhskohbo\\NoCaptcha\\Facades\\NoCaptcha" + } + } + }, + "autoload": { + "psr-4": { + "Anhskohbo\\NoCaptcha\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "anhskohbo", + "email": "anhskohbo@gmail.com" + } + ], + "description": "No CAPTCHA reCAPTCHA For Laravel.", + "keywords": [ + "captcha", + "laravel", + "laravel4", + "laravel5", + "no-captcha", + "recaptcha" + ], + "time": "2018-02-09T02:04:49+00:00" + }, { "name": "arrilot/laravel-widgets", "version": "3.9.0", @@ -2303,7 +2362,7 @@ "lib/random.php" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2736,7 +2795,7 @@ "Prettus\\Validator\\": "src/Prettus/Validator/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "authors": [ { "name": "Anderson Andrade", @@ -2825,7 +2884,7 @@ "Psr\\Container\\": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -3380,7 +3439,7 @@ "lib/swift_required.php" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -5328,7 +5387,7 @@ "Faker\\": "src/Faker/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -5680,7 +5739,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -5727,7 +5786,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -5784,7 +5843,7 @@ ] } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -6547,7 +6606,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6599,7 +6658,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6667,7 +6726,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6717,7 +6776,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6762,7 +6821,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6807,7 +6866,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6996,7 +7055,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], diff --git a/config/app.php b/config/app.php index 4f5d9c3c..1a89b21a 100755 --- a/config/app.php +++ b/config/app.php @@ -75,6 +75,7 @@ return [ Irazasyed\LaravelGAMP\LaravelGAMPServiceProvider::class, Igaster\LaravelTheme\themeServiceProvider::class, Nwidart\Modules\LaravelModulesServiceProvider::class, + Anhskohbo\NoCaptcha\NoCaptchaServiceProvider::class, /* * Application Service Providers... @@ -110,6 +111,7 @@ return [ 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, + 'NoCaptcha' => Anhskohbo\NoCaptcha\Facades\NoCaptcha::class, 'Notification' => Illuminate\Support\Facades\Notification::class, 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, diff --git a/config/captcha.php b/config/captcha.php new file mode 100644 index 00000000..18bac4b3 --- /dev/null +++ b/config/captcha.php @@ -0,0 +1,9 @@ + env('NOCAPTCHA_SECRET'), + 'sitekey' => env('NOCAPTCHA_SITEKEY'), + 'options' => [ + 'timeout' => 2.0, + ], +]; diff --git a/resources/stubs/installer/config.stub b/resources/stubs/installer/config.stub index 250e214c..a5a6e870 100644 --- a/resources/stubs/installer/config.stub +++ b/resources/stubs/installer/config.stub @@ -37,12 +37,22 @@ return [ 'api_key' => '', ], + # + # Other settings and configuration you might not need to modify + # + # overrides cache.php 'cache' => [ 'default' => '$CACHE_DRIVER$', 'prefix' => 'phpvms_', ], + 'captcha' => [ + 'enabled' => true, + 'secret' => '', + 'sitekey' => '', + ], + # overrides database.php 'database' => [ 'default' => env('DB_CONNECTION', '$DB_CONN$'),