62 lines
1.6 KiB
PHP
62 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Vanguard\Providers;
|
|
|
|
use Illuminate\Auth\Events\Registered;
|
|
use Illuminate\Auth\Events\Verified;
|
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
|
use Vanguard\Events\User\Banned;
|
|
use Vanguard\Events\User\LoggedIn;
|
|
use Vanguard\Listeners\Users\ActivateUser;
|
|
use Vanguard\Listeners\Users\InvalidateSessions;
|
|
use Vanguard\Listeners\Login\UpdateLastLoginTimestamp;
|
|
use Vanguard\Listeners\Registration\SendSignUpNotification;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The event listener mappings for the application.
|
|
*
|
|
* @var array<class-string, array<int, class-string>>
|
|
*/
|
|
protected $listen = [
|
|
Registered::class => [
|
|
SendEmailVerificationNotification::class,
|
|
SendSignUpNotification::class,
|
|
],
|
|
LoggedIn::class => [
|
|
UpdateLastLoginTimestamp::class
|
|
],
|
|
Banned::class => [
|
|
InvalidateSessions::class
|
|
],
|
|
Verified::class => [
|
|
ActivateUser::class
|
|
],
|
|
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
|
'SocialiteProviders\\Azure\\AzureExtendSocialite@handle', // Usa una stringa con @handle
|
|
],
|
|
];
|
|
|
|
/**
|
|
* Register any events for your application.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Determine if events and listeners should be automatically discovered.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function shouldDiscoverEvents()
|
|
{
|
|
return false;
|
|
}
|
|
}
|