@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Passphrase "token" credentials accessible via the API

Summary: Fixes T11867. This should really be on the `CredentialType` itself, but just punt that for now until the API endpoint gets updated. We'll need the actual code here anyway in some form.

Test Plan: {F1922728}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11867

Differential Revision: https://secure.phabricator.com/D16864

+8 -3
+8 -3
src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php
··· 82 82 83 83 switch ($credential->getCredentialType()) { 84 84 case PassphraseSSHPrivateKeyFileCredentialType::CREDENTIAL_TYPE: 85 - if ($secret) { 85 + if ($secret !== null) { 86 86 $material['file'] = $secret; 87 87 } 88 88 if ($public_key) { ··· 91 91 break; 92 92 case PassphraseSSHGeneratedKeyCredentialType::CREDENTIAL_TYPE: 93 93 case PassphraseSSHPrivateKeyTextCredentialType::CREDENTIAL_TYPE: 94 - if ($secret) { 94 + if ($secret !== null) { 95 95 $material['privateKey'] = $secret; 96 96 } 97 97 if ($public_key) { ··· 99 99 } 100 100 break; 101 101 case PassphrasePasswordCredentialType::CREDENTIAL_TYPE: 102 - if ($secret) { 102 + if ($secret !== null) { 103 103 $material['password'] = $secret; 104 + } 105 + break; 106 + case PassphraseTokenCredentialType::CREDENTIAL_TYPE: 107 + if ($secret !== null) { 108 + $material['token'] = $secret; 104 109 } 105 110 break; 106 111 }