Add activity logging for authentication events

This commit is contained in:
DaneEveritt 2022-05-28 17:03:58 -04:00
parent 5bb66a00d8
commit 0999ad7ff0
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 179 additions and 18 deletions

View file

@ -10,6 +10,7 @@ use Pterodactyl\Observers\UserObserver;
use Pterodactyl\Observers\ServerObserver;
use Pterodactyl\Observers\SubuserObserver;
use Pterodactyl\Observers\EggVariableObserver;
use Pterodactyl\Listeners\Auth\AuthenticationListener;
use Pterodactyl\Events\Server\Installed as ServerInstalledEvent;
use Pterodactyl\Notifications\ServerInstalled as ServerInstalledNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
@ -22,9 +23,11 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
ServerInstalledEvent::class => [
ServerInstalledNotification::class,
],
ServerInstalledEvent::class => [ServerInstalledNotification::class],
];
protected $subscribe = [
AuthenticationListener::class,
];
/**
@ -39,4 +42,9 @@ class EventServiceProvider extends ServiceProvider
Subuser::observe(SubuserObserver::class);
EggVariable::observe(EggVariableObserver::class);
}
public function shouldDiscoverEvents()
{
return true;
}
}