From 6762540065a31e90ee4fc6d03a9f0a3f328ee3dc Mon Sep 17 00:00:00 2001 From: Lasse Mammen Date: Thu, 29 Feb 2024 12:26:20 +0000 Subject: [PATCH 1/2] fix: setId and id Part-of: --- src/AuthServiceUser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AuthServiceUser.php b/src/AuthServiceUser.php index 0e62866..f5c98f9 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 @@ -108,9 +108,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; } From a0ed29b4f79ff96b5e68eea0e11df7aba1105de1 Mon Sep 17 00:00:00 2001 From: Lasse Mammen Date: Thu, 29 Feb 2024 12:50:21 +0000 Subject: [PATCH 2/2] fix: add object access typing Tested-by: marge-bot Part-of: --- src/AuthServiceUser.php | 7 +++++++ src/BookboonResourceOwner.php | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/AuthServiceUser.php b/src/AuthServiceUser.php index f5c98f9..8a53506 100644 --- a/src/AuthServiceUser.php +++ b/src/AuthServiceUser.php @@ -99,6 +99,9 @@ public function getBlobId(): ?string return $this->blobId; } + /** + * @return array> + */ public function getObjectAccess(): array { return $this->objectAccess; @@ -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[] */