Commaaa2
This commit is contained in:
36
vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php
vendored
Normal file → Executable file
36
vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php
vendored
Normal file → Executable file
@@ -35,11 +35,6 @@ class AuthServiceProvider extends ServiceProvider
|
||||
protected function registerAuthenticator()
|
||||
{
|
||||
$this->app->singleton('auth', function ($app) {
|
||||
// Once the authentication service has actually been requested by the developer
|
||||
// we will set a variable in the application indicating such. This helps us
|
||||
// know that we need to set any queued cookies in the after event later.
|
||||
$app['auth.loaded'] = true;
|
||||
|
||||
return new AuthManager($app);
|
||||
});
|
||||
|
||||
@@ -55,11 +50,9 @@ class AuthServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerUserResolver()
|
||||
{
|
||||
$this->app->bind(
|
||||
AuthenticatableContract::class, function ($app) {
|
||||
return call_user_func($app['auth']->userResolver());
|
||||
}
|
||||
);
|
||||
$this->app->bind(AuthenticatableContract::class, function ($app) {
|
||||
return call_user_func($app['auth']->userResolver());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,15 +76,13 @@ class AuthServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerRequirePassword()
|
||||
{
|
||||
$this->app->bind(
|
||||
RequirePassword::class, function ($app) {
|
||||
return new RequirePassword(
|
||||
$app[ResponseFactory::class],
|
||||
$app[UrlGenerator::class],
|
||||
$app['config']->get('auth.password_timeout')
|
||||
);
|
||||
}
|
||||
);
|
||||
$this->app->bind(RequirePassword::class, function ($app) {
|
||||
return new RequirePassword(
|
||||
$app[ResponseFactory::class],
|
||||
$app[UrlGenerator::class],
|
||||
$app['config']->get('auth.password_timeout')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,11 +107,8 @@ class AuthServiceProvider extends ServiceProvider
|
||||
protected function registerEventRebindHandler()
|
||||
{
|
||||
$this->app->rebinding('events', function ($app, $dispatcher) {
|
||||
if (! $app->resolved('auth')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($app['auth']->hasResolvedGuards() === false) {
|
||||
if (! $app->resolved('auth') ||
|
||||
$app['auth']->hasResolvedGuards() === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user