You are here

protected function LockrRenewForm::renewCert in Lockr 4.x

Renews the current client.

Parameters

string $csr_text: The CSR to sign.

1 call to LockrRenewForm::renewCert()
LockrRenewForm::submitForm in src/Form/LockrRenewForm.php
Form submission handler.

File

src/Form/LockrRenewForm.php, line 317

Class

LockrRenewForm
Form handler for Lockr renew cert.

Namespace

Drupal\lockr\Form

Code

protected function renewCert($csr_text) {
  $query = <<<'EOQ'
mutation Renew($input: RenewCertClient!) {
  renewCertClient(input: $input) {
    auth {
      ... on LockrCert {
        certText
      }
    }
  }
}
EOQ;
  $data = $this->lockrClient
    ->query([
    'query' => $query,
    'variables' => [
      'input' => [
        'csrText' => $csr_text,
      ],
    ],
  ]);
  return $data['renewCertClient']['auth']['certText'];
}