diff --git a/src/AuthServiceUser.php b/src/AuthServiceUser.php index 0e62866..8a53506 100644 --- a/src/AuthServiceUser.php +++ b/src/AuthServiceUser.php @@ -7,7 +7,7 @@ class AuthServiceUser implements UserInterface { - protected string $userId = ''; + protected string $id = ''; protected string $username = ''; protected array $roles = []; protected ?string $email = null; @@ -46,7 +46,7 @@ public function getThumbnail(): string public function getId(): string { - return $this->userId; + return $this->id; } public function getName(): string @@ -99,6 +99,9 @@ public function getBlobId(): ?string return $this->blobId; } + /** + * @return array> + */ public function getObjectAccess(): array { return $this->objectAccess; @@ -108,9 +111,9 @@ public function eraseCredentials(): void { } - public function setUserId(string $userId): static + public function setId(string $id): static { - $this->userId = $userId; + $this->id = $id; return $this; } @@ -155,6 +158,10 @@ public function setBlobId(?string $blobId): static return $this; } + /** + * @param array> $objectAccess + * @return $this + */ public function setObjectAccess(array $objectAccess): static { $this->objectAccess = $objectAccess; diff --git a/src/BookboonResourceOwner.php b/src/BookboonResourceOwner.php index d813a0c..34a99f7 100644 --- a/src/BookboonResourceOwner.php +++ b/src/BookboonResourceOwner.php @@ -85,6 +85,14 @@ public function getApplicationId() return $this->getValueByKey($this->response, 'application.id'); } + /** + * @return array> + */ + public function getObjectAccess() + { + return $this->getValueByKey($this->response, 'user.objectAccess', []); + } + /** * @return string[] */