Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3793359
D207.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D207.diff
View Options
diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php
deleted file mode 100644
--- a/app/Http/Controllers/Auth/AuthController.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-namespace Nasqueron\Notifications\Http\Controllers\Auth;
-
-use Nasqueron\Notifications\User;
-use Validator;
-use Nasqueron\Notifications\Http\Controllers\Controller;
-use Illuminate\Foundation\Auth\ThrottlesLogins;
-use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
-
-class AuthController extends Controller
-{
- /*
- |--------------------------------------------------------------------------
- | Registration & Login Controller
- |--------------------------------------------------------------------------
- |
- | This controller handles the registration of new users, as well as the
- | authentication of existing users. By default, this controller uses
- | a simple trait to add these behaviors. Why don't you explore it?
- |
- */
-
- use AuthenticatesAndRegistersUsers, ThrottlesLogins;
-
- /**
- * Create a new authentication controller instance.
- *
- * @return void
- */
- public function __construct()
- {
- $this->middleware('guest', ['except' => 'getLogout']);
- }
-
- /**
- * Get a validator for an incoming registration request.
- *
- * @param array $data
- * @return \Illuminate\Contracts\Validation\Validator
- */
- protected function validator(array $data)
- {
- return Validator::make($data, [
- 'name' => 'required|max:255',
- 'email' => 'required|email|max:255|unique:users',
- 'password' => 'required|confirmed|min:6',
- ]);
- }
-
- /**
- * Create a new user instance after a valid registration.
- *
- * @param array $data
- * @return User
- */
- protected function create(array $data)
- {
- return User::create([
- 'name' => $data['name'],
- 'email' => $data['email'],
- 'password' => bcrypt($data['password']),
- ]);
- }
-}
diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php
deleted file mode 100644
--- a/app/Http/Controllers/Auth/PasswordController.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-namespace Nasqueron\Notifications\Http\Controllers\Auth;
-
-use Nasqueron\Notifications\Http\Controllers\Controller;
-use Illuminate\Foundation\Auth\ResetsPasswords;
-
-class PasswordController extends Controller
-{
- /*
- |--------------------------------------------------------------------------
- | Password Reset Controller
- |--------------------------------------------------------------------------
- |
- | This controller is responsible for handling password reset requests
- | and uses a simple trait to include this behavior. You're free to
- | explore this trait and override any methods you wish to tweak.
- |
- */
-
- use ResetsPasswords;
-
- /**
- * Create a new password controller instance.
- *
- * @return void
- */
- public function __construct()
- {
- $this->middleware('guest');
- }
-}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -26,8 +26,5 @@
* @var array
*/
protected $routeMiddleware = [
- 'auth' => \Nasqueron\Notifications\Http\Middleware\Authenticate::class,
- 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
- 'guest' => \Nasqueron\Notifications\Http\Middleware\RedirectIfAuthenticated::class,
];
}
diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php
deleted file mode 100644
--- a/app/Http/Middleware/Authenticate.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-namespace Nasqueron\Notifications\Http\Middleware;
-
-use Closure;
-use Illuminate\Contracts\Auth\Guard;
-
-class Authenticate
-{
- /**
- * The Guard implementation.
- *
- * @var Guard
- */
- protected $auth;
-
- /**
- * Create a new filter instance.
- *
- * @param Guard $auth
- * @return void
- */
- public function __construct(Guard $auth)
- {
- $this->auth = $auth;
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @return mixed
- */
- public function handle($request, Closure $next)
- {
- if ($this->auth->guest()) {
- if ($request->ajax()) {
- return response('Unauthorized.', 401);
- } else {
- return redirect()->guest('auth/login');
- }
- }
-
- return $next($request);
- }
-}
diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php
deleted file mode 100644
--- a/app/Http/Middleware/RedirectIfAuthenticated.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-namespace Nasqueron\Notifications\Http\Middleware;
-
-use Closure;
-use Illuminate\Contracts\Auth\Guard;
-
-class RedirectIfAuthenticated
-{
- /**
- * The Guard implementation.
- *
- * @var Guard
- */
- protected $auth;
-
- /**
- * Create a new filter instance.
- *
- * @param Guard $auth
- * @return void
- */
- public function __construct(Guard $auth)
- {
- $this->auth = $auth;
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @return mixed
- */
- public function handle($request, Closure $next)
- {
- if ($this->auth->check()) {
- return redirect('/home');
- }
-
- return $next($request);
- }
-}
diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php
deleted file mode 100644
--- a/app/Providers/AuthServiceProvider.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-namespace Nasqueron\Notifications\Providers;
-
-use Illuminate\Contracts\Auth\Access\Gate as GateContract;
-use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
-
-class AuthServiceProvider extends ServiceProvider
-{
- /**
- * The policy mappings for the application.
- *
- * @var array
- */
- protected $policies = [
- 'Nasqueron\Notifications\Model' => 'Nasqueron\Notifications\Policies\ModelPolicy',
- ];
-
- /**
- * Register any application authentication / authorization services.
- *
- * @param \Illuminate\Contracts\Auth\Access\Gate $gate
- * @return void
- */
- public function boot(GateContract $gate)
- {
- $this->registerPolicies($gate);
-
- //
- }
-}
diff --git a/config/app.php b/config/app.php
--- a/config/app.php
+++ b/config/app.php
@@ -146,7 +146,6 @@
/*
* Laravel Framework Service Providers...
*/
- Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
@@ -162,7 +161,6 @@
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
- Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
@@ -172,7 +170,6 @@
* Application Service Providers...
*/
Nasqueron\Notifications\Providers\AppServiceProvider::class,
- Nasqueron\Notifications\Providers\AuthServiceProvider::class,
Nasqueron\Notifications\Providers\BrokerServiceProvider::class,
Nasqueron\Notifications\Providers\EventServiceProvider::class,
Nasqueron\Notifications\Providers\ReportServiceProvider::class,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 20:16 (18 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2269834
Default Alt Text
D207.diff (7 KB)
Attached To
Mode
D207: Prune not used user authentication class
Attached
Detach File
Event Timeline
Log In to Comment