feat: integrated OAuth2 server
This commit is contained in:
@@ -16,4 +16,4 @@ class Availability implements \JsonSerializable
|
||||
'available' => $this->available,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ class Country
|
||||
public ?string $name = null;
|
||||
public ?string $token = null;
|
||||
public ?string $nationality = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ class CrmAttributes
|
||||
public bool $teamer = false;
|
||||
public ?string $hotelCode = null;
|
||||
public array $roles = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ class CrmSelection
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public bool $selected = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -100,4 +100,4 @@ class Error
|
||||
985 => 'Zustieg mit ID #1# nicht fürs Internet buchbar',
|
||||
999 => 'Systemfehler: #1#',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ class File
|
||||
public ?string $filename = null;
|
||||
public ?string $content = null;
|
||||
public ?string $mimeType = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ class Guide
|
||||
{
|
||||
public ?string $name = null;
|
||||
public ?string $phone = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,4 @@ class Hotel
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?string $country = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ class MutableData
|
||||
public ?string $category = null;
|
||||
public bool $mutable = false;
|
||||
public ?\DateTimeImmutable $mutableBefore = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ class Pickup
|
||||
|
||||
#[Groups(['api:booking'])]
|
||||
public array $mapping = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,4 +63,4 @@ class Room
|
||||
|
||||
#[Groups(['booking'])]
|
||||
public array $individualPrice = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -8,4 +8,4 @@ class Surcharge
|
||||
public array $mapping = [];
|
||||
public ?float $totalPrice = null;
|
||||
public array $individualPrice = [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user