public function onCxnRegister($cxn, $params) {
    $storedCxn = $this->cxnStore->getByCxnId($cxn['cxnId']);

    if (!$storedCxn || $storedCxn['secret'] == $cxn['secret']) {
      $this->log->notice('Register cxnId="{cxnId}" siteUrl={siteUrl}: OK', array(
        'cxnId' => $cxn['cxnId'],
        'siteUrl' => $cxn['siteUrl'],
      ));
      $this->cxnStore->add($cxn);
      return $this->createSuccess(array(
        'cxn_id' => $cxn['cxnId'],
      ));
    }
    else {
      $this->log->warning('Register cxnId="{cxnId}" siteUrl="{siteUrl}": Secret does not match.', array(
        'cxnId' => $cxn['cxnId'],
        'siteUrl' => $cxn['siteUrl'],
      ));
      $this->createError('Secret does not match previous registration.');
    }
  }