public function getProvisioningUri()
{
$params = [];
if (30 !== $this->getPeriod()) {
$params = ['period' => $this->getPeriod()];
}
return $this->generateURI('totp', $params);
}
/** * Get the QR Code URL for the otp instance * @param TOTP|null $totp * @return string */ public function getQRCodeGoogleUrl(TOTP $totp = null) { $base_url = 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl='; if ($totp !== null) { return $base_url . urlencode($totp->getProvisioningUri()); } else { return $base_url . urlencode($this->totp->getProvisioningUri()); } }