Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
Show First 20 Lines • Show All 300 Lines • ▼ Show 20 Lines | final class PhabricatorUser | ||||
public function getSession() { | public function getSession() { | ||||
return $this->assertAttached($this->session); | return $this->assertAttached($this->session); | ||||
} | } | ||||
public function hasSession() { | public function hasSession() { | ||||
return ($this->session !== self::ATTACHABLE); | return ($this->session !== self::ATTACHABLE); | ||||
} | } | ||||
public function hasHighSecuritySession() { | |||||
if (!$this->hasSession()) { | |||||
return false; | |||||
} | |||||
return $this->getSession()->isHighSecuritySession(); | |||||
} | |||||
private function generateConduitCertificate() { | private function generateConduitCertificate() { | ||||
return Filesystem::readRandomCharacters(255); | return Filesystem::readRandomCharacters(255); | ||||
} | } | ||||
const CSRF_CYCLE_FREQUENCY = 3600; | const CSRF_CYCLE_FREQUENCY = 3600; | ||||
const CSRF_SALT_LENGTH = 8; | const CSRF_SALT_LENGTH = 8; | ||||
const CSRF_TOKEN_LENGTH = 16; | const CSRF_TOKEN_LENGTH = 16; | ||||
const CSRF_BREACH_PREFIX = 'B@'; | const CSRF_BREACH_PREFIX = 'B@'; | ||||
▲ Show 20 Lines • Show All 1,345 Lines • Show Last 20 Lines |