Changeset View
Changeset View
Standalone View
Standalone View
src/applications/passphrase/storage/PassphraseCredential.php
Show All 29 Lines | final class PassphraseCredential extends PassphraseDAO | ||||
public function getMonogram() { | public function getMonogram() { | ||||
return 'K'.$this->getID(); | return 'K'.$this->getID(); | ||||
} | } | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'name' => 'text255', | |||||
'credentialType' => 'text64', | |||||
'providesType' => 'text64', | |||||
'description' => 'text', | |||||
'username' => 'text255', | |||||
'secretID' => 'id?', | |||||
'isDestroyed' => 'bool', | |||||
'isLocked' => 'bool', | |||||
'allowConduit' => 'bool', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_secret' => array( | |||||
'columns' => array('secretID'), | |||||
'unique' => true, | |||||
), | |||||
'key_type' => array( | |||||
'columns' => array('credentialType'), | |||||
), | |||||
'key_provides' => array( | |||||
'columns' => array('providesType'), | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PassphraseCredentialPHIDType::TYPECONST); | PassphraseCredentialPHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |