Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/engine/PhabricatorAuthSessionEngine.php
Show First 20 Lines • Show All 484 Lines • ▼ Show 20 Lines | /* -( High Security )------------------------------------------------------ */ | ||||
* @param bool Force token issue. | * @param bool Force token issue. | ||||
* @return PhabricatorAuthHighSecurityToken|null Token, if authorized. | * @return PhabricatorAuthHighSecurityToken|null Token, if authorized. | ||||
* @task hisec | * @task hisec | ||||
*/ | */ | ||||
private function issueHighSecurityToken( | private function issueHighSecurityToken( | ||||
PhabricatorAuthSession $session, | PhabricatorAuthSession $session, | ||||
$force = false) { | $force = false) { | ||||
$until = $session->getHighSecurityUntil(); | if ($session->isHighSecuritySession() || $force) { | ||||
if ($until > time() || $force) { | |||||
return new PhabricatorAuthHighSecurityToken(); | return new PhabricatorAuthHighSecurityToken(); | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 355 Lines • Show Last 20 Lines |