config = $config; $this->name = $name; $this->userProvider = $userProvider; } public function getName(): string { return $this->name; } public function check(): bool { return $this->user() instanceof Authenticatable; } public function guest(): bool { return ! $this->check(); } public function getProvider(): UserProvider { return $this->userProvider; } public function id() { return $this->user()->getId(); } }