|
|
|
|
@ -38,17 +38,17 @@ class UserManagement implements WorkflowInterface
|
|
|
|
|
$html = "<div id=\"enroll\"><form %frm>";
|
|
|
|
|
$html .= $this->csrf->emitStr();
|
|
|
|
|
$html .= "<p>To add an authenticator to your account, scan the QR code</p>";
|
|
|
|
|
$html .= "<img src=%qr alt=\"qr-code\" />";
|
|
|
|
|
$html .= "<img src=%qr alt=\"qr-code\" height=256px width=256px/>";
|
|
|
|
|
$html .= "<label for=\"totp_challenge\">Enter the authentication code:</label>";
|
|
|
|
|
$html .= "<input name=\"totp_challenge\" id=\"totp_challenge\" type=\"text\" >";
|
|
|
|
|
$html .= "<input type=\"submit\" value=\"Submit\" />";
|
|
|
|
|
$html .= "</form></div>";
|
|
|
|
|
|
|
|
|
|
$provisioningUri = (new Otpauth(
|
|
|
|
|
"taatp",
|
|
|
|
|
$this->db->userString($this->userIndex),
|
|
|
|
|
"taatp",
|
|
|
|
|
$this->hash->keygen(),
|
|
|
|
|
"SHA1",
|
|
|
|
|
$this->hash->hashType(),
|
|
|
|
|
30,
|
|
|
|
|
6
|
|
|
|
|
))->emitStr();
|
|
|
|
|
|