Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/storage/PhabricatorAuthSession.php
Show All 38 Lines | final class PhabricatorAuthSession extends PhabricatorAuthDAO | ||||
public function getIdentityObject() { | public function getIdentityObject() { | ||||
return $this->assertAttached($this->identityObject); | return $this->assertAttached($this->identityObject); | ||||
} | } | ||||
public static function getSessionTypeTTL($session_type) { | public static function getSessionTypeTTL($session_type) { | ||||
switch ($session_type) { | switch ($session_type) { | ||||
case self::TYPE_WEB: | case self::TYPE_WEB: | ||||
return (60 * 60 * 24 * 30); // 30 days | return phutil_units('30 days in seconds'); | ||||
case self::TYPE_CONDUIT: | case self::TYPE_CONDUIT: | ||||
return (60 * 60 * 24); // 24 hours | return phutil_units('24 hours in seconds'); | ||||
default: | default: | ||||
throw new Exception(pht('Unknown session type "%s".', $session_type)); | throw new Exception(pht('Unknown session type "%s".', $session_type)); | ||||
} | } | ||||
} | } | ||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */ | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
Show All 30 Lines |