feat: extended oauth2 user info and refactored authenticator

This commit is contained in:
Björn Fromme
2026-03-16 12:00:56 +01:00
parent 4afdd79252
commit 65f8436aa7
7 changed files with 75 additions and 40 deletions
+15
View File
@@ -29,6 +29,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(type: 'json')]
private array $roles = [];
#[ORM\Column(type: 'json')]
private array $hotelCodes = [];
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $lastLoginAt = null;
@@ -102,6 +105,18 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
return $this;
}
public function getHotelCodes(): array
{
return $this->hotelCodes;
}
public function setHotelCodes(array $hotelCodes): static
{
$this->hotelCodes = $hotelCodes;
return $this;
}
public function getLastLoginAt(): ?\DateTimeImmutable
{
return $this->lastLoginAt;