Prepare scopes array to bind to model

This commit is contained in:
Artem Vasilev 2024-03-12 23:09:12 +03:00
parent fb8f2fa9f2
commit 3d3468b663

View File

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