[PLUGIN][OAuth2] Fix some static issues

This commit is contained in:
2022-02-04 18:34:08 +00:00
parent 4dd976eb22
commit 81f6d496c6
15 changed files with 206 additions and 202 deletions

View File

@@ -33,18 +33,19 @@ declare(strict_types = 1);
namespace Plugin\OAuth2\Util;
use App\Entity\Actor;
use App\Util\Exception\BugFoundException;
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
use League\OAuth2\Server\ResponseTypes\BearerTokenResponse;
class ExpandedBearerTokenResponse extends BearerTokenResponse
{
/**
* @return array
* @throws BugFoundException
*/
protected function getExtraParams(AccessTokenEntityInterface $access_token)
protected function getExtraParams(AccessTokenEntityInterface $accessToken): array
{
return [
'me' => Actor::getById($access_token->getUserIdentifier())->getUri(),
'me' => Actor::getById($accessToken->getUserIdentifier())->getUri(),
];
}
}