Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/storage/PhabricatorAuthSession.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | public function attachIdentityObject($identity_object) { | ||||
$this->identityObject = $identity_object; | $this->identityObject = $identity_object; | ||||
return $this; | return $this; | ||||
} | } | ||||
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, $is_partial) { | ||||
switch ($session_type) { | switch ($session_type) { | ||||
case self::TYPE_WEB: | case self::TYPE_WEB: | ||||
if ($is_partial) { | |||||
return phutil_units('30 minutes in seconds'); | |||||
} else { | |||||
return phutil_units('30 days in seconds'); | return phutil_units('30 days in seconds'); | ||||
} | |||||
case self::TYPE_CONDUIT: | case self::TYPE_CONDUIT: | ||||
return phutil_units('24 hours in seconds'); | 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)); | ||||
} | } | ||||
} | } | ||||
public function getPHIDType() { | public function getPHIDType() { | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |