<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-ide-helper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/reflection-docblock" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/biscolab/laravel-recaptcha" />
<excludeFolder url="file://$MODULE_DIR$/vendor/caouecs/laravel-lang" />
<excludeFolder url="file://$MODULE_DIR$/vendor/clue/stream-filter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/coderello/laravel-nova-lang" />
<path value="$PROJECT_DIR$/vendor/jean85/pretty-package-versions" />
<path value="$PROJECT_DIR$/vendor/sentry/sentry" />
<path value="$PROJECT_DIR$/vendor/sentry/sentry-laravel" />
+ <path value="$PROJECT_DIR$/vendor/biscolab/laravel-recaptcha" />
</include_path>
</component>
<component name="PhpInterpreters">
'first_name' => $request->input('first_name'),
'last_name' => $request->input('last_name'),
'password' => \Hash::make($request->input('password')),
- 'reg_complete' => true
+ 'reg_complete' => true,
]);
+ $user->markEmailAsVerified();
+
LoginToken::where('token', $request->input('login_token'))->delete();
->where(fn(Builder $builder) => $builder->where('type', User::TYPE_USER))
],
'password' => ['required', 'string', 'min:8', 'confirmed'],
+ recaptchaFieldName() => recaptchaRuleName(),
]);
}
}
+ protected function registered(Request $request, $user)
+ {
+ \Session::flash('message', 'Votre inscription à bien été prise en compte ! Veuillez vérifier vos emails.');
+ }
}
{
$this->authorize('view', $file);
+
AccessLog::log($request, $file);
return $file->view();
}
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
+use Illuminate\Foundation\Auth\VerifiesEmails;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
* @property bool $reg_complete
* @property string $status
*/
-class User extends Authenticatable
+class User extends Authenticatable implements MustVerifyEmail
{
use Notifiable;
use Searchable;
"algolia/algoliasearch-client-php": "^2.6",
"anaseqal/nova-import": "^0.0.3",
"area17/twill": "^2.0",
+ "biscolab/laravel-recaptcha": "^4.1",
"caouecs/laravel-lang": "~6.0",
"coderello/laravel-nova-lang": "^1.4",
"fideloper/proxy": "^4.2",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "619658d66882bcbce2ed61728005dc01",
+ "content-hash": "5c282ec3e2dd3c868fc7681ebeedb9f5",
"packages": [
{
"name": "algolia/algoliasearch-client-php",
"homepage": "https://github.com/Bacon/BaconQrCode",
"time": "2018-04-25T17:53:56+00:00"
},
+ {
+ "name": "biscolab/laravel-recaptcha",
+ "version": "4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/biscolab/laravel-recaptcha.git",
+ "reference": "9bfe22ffb78efaff005659af68867d1ba52c0a00"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/biscolab/laravel-recaptcha/zipball/9bfe22ffb78efaff005659af68867d1ba52c0a00",
+ "reference": "9bfe22ffb78efaff005659af68867d1ba52c0a00",
+ "shasum": ""
+ },
+ "require": {
+ "laravel/framework": "^5.5|^6.0|^7.0",
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "orchestra/testbench": "~3.0",
+ "phpunit/phpunit": "6.*|7.*"
+ },
+ "suggest": {
+ "biscolab/laravel-authlog": "Allows logged-in users management and forced log-out"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Biscolab\\ReCaptcha\\ReCaptchaServiceProvider"
+ ],
+ "aliases": {
+ "ReCaptcha": "Biscolab\\ReCaptcha\\Facades\\ReCaptcha"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Biscolab\\ReCaptcha\\": "src/"
+ },
+ "files": [
+ "src/helpers.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Roberto Belotti",
+ "email": "roby.belotti@gmail.com",
+ "homepage": "https://biscolab.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "Simple and painless Google reCAPTCHA package for Laravel 5, 6 and 7",
+ "homepage": "https://biscolab.com/laravel-recaptcha",
+ "keywords": [
+ "captcha",
+ "laravel",
+ "recaptcha",
+ "validation"
+ ],
+ "time": "2020-03-06T23:25:41+00:00"
+ },
{
"name": "brick/math",
"version": "0.8.14",
--- /dev/null
+<?php
+/**
+ * Copyright (c) 2017 - present
+ * LaravelGoogleRecaptcha - recaptcha.php
+ * author: Roberto Belotti - roby.belotti@gmail.com
+ * web : robertobelotti.com, github.com/biscolab
+ * Initial version created on: 12/9/2018
+ * MIT license: https://github.com/biscolab/laravel-recaptcha/blob/master/LICENSE
+ */
+
+/**
+ * To configure correctly please visit https://developers.google.com/recaptcha/docs/start
+ */
+return [
+
+ /**
+ *
+ * The site key
+ * get site key @ www.google.com/recaptcha/admin
+ *
+ */
+ 'api_site_key' => env('RECAPTCHA_SITE_KEY', ''),
+
+ /**
+ *
+ * The secret key
+ * get secret key @ www.google.com/recaptcha/admin
+ *
+ */
+ 'api_secret_key' => env('RECAPTCHA_SECRET_KEY', ''),
+
+ /**
+ *
+ * ReCATCHA version
+ * Supported: "v2", "invisible", "v3",
+ *
+ * get more info @ https://developers.google.com/recaptcha/docs/versions
+ *
+ */
+ 'version' => 'v2',
+
+ /**
+ *
+ * The curl timout in seconds to validate a recaptcha token
+ * @since v3.5.0
+ *
+ */
+ 'curl_timeout' => 10,
+
+ /**
+ *
+ * IP addresses for which validation will be skipped
+ *
+ */
+ 'skip_ip' => [],
+
+ /**
+ *
+ * Default route called to check the Google reCAPTCHA token
+ * @since v3.2.0
+ *
+ */
+ 'default_validation_route' => 'recaptcha/validate',
+
+ /**
+ *
+ * The name of the parameter used to send Google reCAPTCHA token to verify route
+ * @since v3.2.0
+ *
+ */
+ 'default_token_parameter_name' => 'token',
+
+ /**
+ *
+ * The default Google reCAPTCHA language code
+ * It has no effect with v3
+ * @see https://developers.google.com/recaptcha/docs/language
+ * @since v3.6.0
+ *
+ */
+ 'default_language' => 'fr',
+
+ /**
+ *
+ * The default form ID. Only for "invisible" reCAPTCHA
+ * @since v4.0.0
+ *
+ */
+ 'default_form_id' => 'recaptcha-invisible-form',
+
+ /**
+ *
+ * Deferring the render can be achieved by specifying your onload callback function and adding parameters to the JavaScript resource.
+ * It has no effect with v3 and invisible
+ * @see https://developers.google.com/recaptcha/docs/display#explicit_render
+ * @since v4.0.0
+ * Supported true, false
+ *
+ */
+ 'explicit' => false,
+
+ /**
+ *
+ * g-recaptcha tag attributes and grecaptcha.render parameters (v2 only)
+ * @see https://developers.google.com/recaptcha/docs/display#render_param
+ * @since v4.0.0
+ */
+ 'tag_attributes' => [
+
+ /**
+ * The color theme of the widget.
+ * Supported "light", "dark"
+ */
+ 'theme' => 'light',
+
+ /**
+ * The size of the widget.
+ * Supported "normal", "compact"
+ */
+ 'size' => 'normal',
+
+ /**
+ * The tabindex of the widget and challenge.
+ * If other elements in your page use tabindex, it should be set to make user navigation easier.
+ */
+ 'tabindex' => 0,
+
+ /**
+ * The name of your callback function, executed when the user submits a successful response.
+ * The g-recaptcha-response token is passed to your callback.
+ * DO NOT SET "biscolabOnloadCallback"
+ */
+ 'callback' => null,
+
+ /**
+ * The name of your callback function, executed when the reCAPTCHA response expires and the user needs to re-verify.
+ * DO NOT SET "biscolabOnloadCallback"
+ */
+ 'expired-callback' => null,
+
+ /**
+ * The name of your callback function, executed when reCAPTCHA encounters an error (usually network connectivity) and cannot continue until connectivity is restored.
+ * If you specify a function here, you are responsible for informing the user that they should retry.
+ * DO NOT SET "biscolabOnloadCallback"
+ */
+ 'error-callback' => null,
+ ]
+];
"A fresh verification link has been sent to your email address.": "Un nouveau lien de vérification a été envoyé à votre adresse email.",
"All rights reserved.": "Tous droits réservés.",
"Before proceeding, please check your email for a verification link.": "Avant de continuer, veuillez vérifier votre courrier électronique pour un lien de vérification.",
- "click here to request another": "cliquer ici pour faire une autre demande",
+ "click here to request another": "cliquez ici pour faire une autre demande",
"Confirm Password": "Confirmez le mot de passe",
"E-Mail Address": "Adresse email",
"Error": "Erreur",
],
],
+ 'recaptcha' => "Merci de cocher la case 'je ne suis pas un robot'",
+
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
</div>
</div>
+ <div class="form-group row">
+ <div class="col-4"></div>
+ <div class="col-8">
+ @error(recaptchaFieldName())
+ <span class="invalid-feedback" role="alert">
+ <strong>{{ $message }}</strong>
+ </span>
+ @enderror
+ {!! ReCaptcha::htmlFormSnippet() !!}
+ </div>
+ </div>
+
<div class="form-group row mb-0">
<div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary">
</div>
@endif
+
+
+ @if (session('resent'))
+ <div class="alert alert-success" role="alert">
+ {{ __('A fresh verification link has been sent to your email address.') }}
+ </div>
+ @elseif(\Auth::check() && !\Auth::user()->hasVerifiedEmail())
+ <div class="alert alert-warning">
+ {{ __('Before proceeding, please check your email for a verification link.') }}
+ {{ __('If you did not receive the email') }},
+ <form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
+ @csrf
+ <button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>.
+ </form>
+ </div>
+ @endif
+
<h1>L'actualité à la une de notre quotidien</h1>
<div class="row justify-content-center pt-3">
<div class="col-md-4">
@yield('scripts')
+ {!! ReCaptcha::htmlScriptTagJsApi() !!}
+
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
/** Flowpaper viewer */
Route::middleware('login.token')
->get('/view/{file:slug}', 'FlowpaperController@view')
- ->name('flowpaper.view');
+ ->name('flowpaper.view')
+ ->middleware('verified');
+
Route::get('edition/{file:slug}', 'FileController@show');