mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-23 22:34:50 +03:00
Prepare scopes array to bind to model
This commit is contained in:
parent
c28974bf33
commit
45aa876187
@ -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()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user