Skip to content

Commit

Permalink
Merge branch 'hotfix/user-id' into 'main'
Browse files Browse the repository at this point in the history
fix: setId and id

See merge request internal/oauth2-client-php!13
  • Loading branch information
marge-bot committed Feb 29, 2024
2 parents ec39368 + a0ed29b commit 8cd0137
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/AuthServiceUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class AuthServiceUser implements UserInterface
{
protected string $userId = '';
protected string $id = '';
protected string $username = '';
protected array $roles = [];
protected ?string $email = null;
Expand Down Expand Up @@ -46,7 +46,7 @@ public function getThumbnail(): string

public function getId(): string
{
return $this->userId;
return $this->id;
}

public function getName(): string
Expand Down Expand Up @@ -99,6 +99,9 @@ public function getBlobId(): ?string
return $this->blobId;
}

/**
* @return array<string, array<array{objectId: string, name: string, totalUsers?: float, defaultGroup?: string}>>
*/
public function getObjectAccess(): array
{
return $this->objectAccess;
Expand All @@ -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;
}

Expand Down Expand Up @@ -155,6 +158,10 @@ public function setBlobId(?string $blobId): static
return $this;
}

/**
* @param array<string, array<array{objectId: string, name: string, totalUsers?: float, defaultGroup?: string}>> $objectAccess
* @return $this
*/
public function setObjectAccess(array $objectAccess): static
{
$this->objectAccess = $objectAccess;
Expand Down
8 changes: 8 additions & 0 deletions src/BookboonResourceOwner.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ public function getApplicationId()
return $this->getValueByKey($this->response, 'application.id');
}

/**
* @return array<string, array<array{objectId: string, name: string, totalUsers?: float, defaultGroup?: string}>>
*/
public function getObjectAccess()
{
return $this->getValueByKey($this->response, 'user.objectAccess', []);
}

/**
* @return string[]
*/
Expand Down

0 comments on commit 8cd0137

Please sign in to comment.