/**
  * {@inheritdoc}
  */
 public function persistNewRefreshToken(RefreshTokenEntityInterface $refreshTokenEntityInterface)
 {
     $refreshTokenModel = new RefreshTokensModel();
     $refreshTokenModel->id = $refreshTokenEntityInterface->getIdentifier();
     $refreshTokenModel->access_token_id = $refreshTokenEntityInterface->getAccessToken()->getIdentifier();
     $refreshTokenModel->expire_time = $refreshTokenEntityInterface->getExpiryDateTime()->getTimestamp();
     $refreshTokenModel->save();
 }
 /**
  * Create a new refresh token_name.
  *
  * @param \League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface $refreshTokenEntity
  */
 public function persistNewRefreshToken(RefreshTokenEntityInterface $refreshTokenEntity)
 {
     $refreshToken = new \Ivyhjk\OAuth2\Server\Adapter\Phalcon\Model\RefreshToken();
     $refreshToken->id = $refreshTokenEntity->getIdentifier();
     $refreshToken->access_token_id = $refreshTokenEntity->getAccessToken()->getIdentifier();
     $refreshToken->expire_time = $refreshTokenEntity->getExpiryDateTime()->format('Y-m-d H:i:s');
     if (!$refreshToken->save()) {
         prx($refreshToken->getMessages());
     }
 }
 /**
  * @inheritDoc
  */
 public function persistNewRefreshToken(RefreshTokenEntityInterface $refreshTokenEntity)
 {
     $this->conn->insert($this->getTableName(), ['id' => $refreshTokenEntity->getIdentifier(), 'expires_at' => $refreshTokenEntity->getExpiryDateTime(), 'accesstoken_id' => $refreshTokenEntity->getAccessToken()->getIdentifier()], ['string', 'datetime', 'string']);
 }