$scope) { if ($scope->getIdentifier() === PublicScopeRepository::OFFLINE_ACCESS) { unset($scopes[$i]); $this->getEmitter()->emit(new RequestedRefreshToken()); } } return parent::issueAccessToken($accessTokenTTL, $client, $userIdentifier, $scopes); } protected function validateRedirectUri( string $redirectUri, ClientEntityInterface $client, ServerRequestInterface $request ): void { $allowedRedirectUris = (array)$client->getRedirectUri(); foreach ($allowedRedirectUris as $allowedRedirectUri) { if (StringHelper::startsWith($redirectUri, $allowedRedirectUri)) { return; } } $this->getEmitter()->emit(new RequestEvent(RequestEvent::CLIENT_AUTHENTICATION_FAILED, $request)); throw OAuthServerException::invalidClient($request); } }