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
fb8f2fa9f2
commit
3d3468b663
@ -24,11 +24,13 @@ class AuthCode implements AuthCodeEntityInterface
|
|||||||
|
|
||||||
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