feat: integrated OAuth2 server

This commit is contained in:
Björn Fromme
2025-04-24 20:28:27 +02:00
parent c418ae6399
commit adbfb49c11
84 changed files with 2542 additions and 312 deletions
+1 -1
View File
@@ -16,4 +16,4 @@ class Availability implements \JsonSerializable
'available' => $this->available,
];
}
}
}
+3 -2
View File
@@ -5,7 +5,8 @@ namespace App\BusProNet\Model;
class BaseData
{
public function __construct(private readonly array $items)
{}
{
}
public function getItems(): array
{
@@ -16,4 +17,4 @@ class BaseData
{
return $this->items[$key] ?? null;
}
}
}
+1 -1
View File
@@ -8,4 +8,4 @@ class Country
public ?string $name = null;
public ?string $token = null;
public ?string $nationality = null;
}
}
+1 -1
View File
@@ -12,4 +12,4 @@ class CrmAttributes
public bool $teamer = false;
public ?string $hotelCode = null;
public array $roles = [];
}
}
+1 -1
View File
@@ -17,4 +17,4 @@ class CrmSelection
#[Groups(['api:single'])]
public bool $selected = false;
}
}
+2 -1
View File
@@ -8,7 +8,8 @@ class CrmSelectionGroup
{
/**
* Maps BusPro IDs of CRM selection groups representing
* included services
* included services.
*
* @var array|string[]
*/
public static array $includedServicesMapping = [
+1 -1
View File
@@ -100,4 +100,4 @@ class Error
985 => 'Zustieg mit ID #1# nicht fürs Internet buchbar',
999 => 'Systemfehler: #1#',
];
}
}
+1 -1
View File
@@ -14,4 +14,4 @@ class File
public ?string $filename = null;
public ?string $content = null;
public ?string $mimeType = null;
}
}
+1 -1
View File
@@ -6,4 +6,4 @@ class Guide
{
public ?string $name = null;
public ?string $phone = null;
}
}
+1 -1
View File
@@ -26,4 +26,4 @@ class Hotel
#[Groups(['api:list', 'api:single'])]
public ?string $country = null;
}
}
+1 -1
View File
@@ -21,4 +21,4 @@ class MutableData
public ?string $category = null;
public bool $mutable = false;
public ?\DateTimeImmutable $mutableBefore = null;
}
}
+32
View File
@@ -64,4 +64,36 @@ class PersonalData
'bemerkung' => $this->remarks,
];
}
public function getClaims(): array
{
return [
'email' => $this->communication->email,
'profile' => [
'first_name' => $this->firstName,
'last_name' => $this->name,
'title' => $this->title,
'salutation' => $this->salutation,
'gender' => $this->gender,
'nationality' => $this->nationality,
'address' => [
'street' => $this->address->street,
'postcode' => $this->address->postCode,
'city' => $this->address->city,
'disctrict' => $this->address->district,
'country' => $this->address->country,
],
'communication' => [
'email' => $this->communication->email,
'mobile' => $this->communication->mobile,
'phone' => $this->communication->phone,
'newsletter' => $this->communication->newsletter,
],
'height' => $this->height,
'weight' => $this->weight,
'shoe_size' => $this->shoeSize,
'remarks' => $this->remarks,
],
];
}
}
+1 -1
View File
@@ -32,4 +32,4 @@ class Pickup
#[Groups(['api:booking'])]
public array $mapping = [];
}
}
+1 -1
View File
@@ -63,4 +63,4 @@ class Room
#[Groups(['booking'])]
public array $individualPrice = [];
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ class Service
public ?string $category = null;
#[Groups(['api:single', 'api:list'])]
public ?string $status = null;
public ?string $status = null;
#[Groups(['api:single', 'api:list'])]
public bool $mandatory = false;
+1 -1
View File
@@ -8,4 +8,4 @@ class Surcharge
public array $mapping = [];
public ?float $totalPrice = null;
public array $individualPrice = [];
}
}