Differential D20905 Diff 49825 src/applications/passphrase/credentialtype/PassphraseCredentialType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/passphrase/credentialtype/PassphraseCredentialType.php
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | /* -( Passwords )---------------------------------------------------------- */ | ||||
* @return string Human-readable field label. | * @return string Human-readable field label. | ||||
* | * | ||||
* @task password | * @task password | ||||
*/ | */ | ||||
public function getPasswordLabel() { | public function getPasswordLabel() { | ||||
return pht('Password'); | return pht('Password'); | ||||
} | } | ||||
/** | |||||
* Return true if the provided credential requires a password to decrypt. | |||||
* | |||||
* @param PhutilOpaqueEnvelope Credential secret value. | |||||
* @return bool True if the credential needs a password. | |||||
* | |||||
* @task password | |||||
*/ | |||||
public function requiresPassword(PhutilOpaqueEnvelope $secret) { | |||||
return false; | |||||
} | |||||
/** | |||||
* Return the decrypted credential secret, or `null` if the password does | |||||
* not decrypt the credential. | |||||
* | |||||
* @param PhutilOpaqueEnvelope Credential secret value. | |||||
* @param PhutilOpaqueEnvelope Credential password. | |||||
* @return | |||||
* @task password | |||||
*/ | |||||
public function decryptSecret( | |||||
PhutilOpaqueEnvelope $secret, | |||||
PhutilOpaqueEnvelope $password) { | |||||
return $secret; | |||||
} | |||||
public function shouldRequireUsername() { | public function shouldRequireUsername() { | ||||
return true; | return true; | ||||
} | } | ||||
} | } |