Prepare scopes array to bind to model

This commit is contained in:
Artem Vasilev 2024-03-12 14:17:42 +03:00
parent c28974bf33
commit 45aa876187

View File

@ -24,11 +24,13 @@ class AccessToken implements AccessTokenEntityInterface
public function getData(): array public function getData(): array
{ {
$scopes = array_map(fn($scope) => ['scope' => (string) $scope], $this->getScopes());
return [ return [
'identifier' => $this->getIdentifier(), 'identifier' => $this->getIdentifier(),
'expiry' => $this->getExpiryDateTime(), 'expiry' => $this->getExpiryDateTime(),
'user_id' => $this->getUserIdentifier(), 'user_id' => $this->getUserIdentifier(),
'scopes' => $this->getScopes(), 'scopes' => $scopes,
'client_identifier' => $this->getClient()->getIdentifier() 'client_identifier' => $this->getClient()->getIdentifier()
]; ];
} }