/** * {@inheritdoc} */ public function createRefreshToken($tokenString, IOAuth2Client $client, $data, $expires, $scope = NULL) { if (!$client instanceof ClientInterface) { throw new \InvalidArgumentException('Client has to implement the ClientInterface'); } $token = $this->refreshTokenManager->createToken(); $token->setToken($tokenString); $token->setClient($client); $token->setExpiresAt($expires); $token->setScope($scope); if (null !== $data) { $token->setUser($data); } $this->refreshTokenManager->updateToken($token); return $token; }