Differential D19889 Diff 47491 src/applications/legalpad/controller/LegalpadDocumentSignController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/legalpad/controller/LegalpadDocumentSignController.php
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
} | } | ||||
$errors = array(); | $errors = array(); | ||||
$hisec_token = null; | $hisec_token = null; | ||||
if ($request->isFormOrHisecPost() && !$has_signed) { | if ($request->isFormOrHisecPost() && !$has_signed) { | ||||
// Require two-factor auth to sign legal documents. | // Require two-factor auth to sign legal documents. | ||||
if ($viewer->isLoggedIn()) { | if ($viewer->isLoggedIn()) { | ||||
$workflow_key = sprintf( | |||||
'legalpad.sign(%s)', | |||||
$document->getPHID()); | |||||
$hisec_token = id(new PhabricatorAuthSessionEngine()) | $hisec_token = id(new PhabricatorAuthSessionEngine()) | ||||
->setWorkflowKey($workflow_key) | |||||
->requireHighSecurityToken( | ->requireHighSecurityToken( | ||||
$viewer, | $viewer, | ||||
$request, | $request, | ||||
$document->getURI()); | $document->getURI()); | ||||
} | } | ||||
list($form_data, $errors, $field_errors) = $this->readSignatureForm( | list($form_data, $errors, $field_errors) = $this->readSignatureForm( | ||||
$document, | $document, | ||||
▲ Show 20 Lines • Show All 537 Lines • Show Last 20 Lines |