diff --git a/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php b/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php index 387e01cb2e..a9375c1b67 100644 --- a/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php +++ b/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php @@ -82,7 +82,7 @@ final class PassphraseQueryConduitAPIMethod switch ($credential->getCredentialType()) { case PassphraseSSHPrivateKeyFileCredentialType::CREDENTIAL_TYPE: - if ($secret) { + if ($secret !== null) { $material['file'] = $secret; } if ($public_key) { @@ -91,7 +91,7 @@ final class PassphraseQueryConduitAPIMethod break; case PassphraseSSHGeneratedKeyCredentialType::CREDENTIAL_TYPE: case PassphraseSSHPrivateKeyTextCredentialType::CREDENTIAL_TYPE: - if ($secret) { + if ($secret !== null) { $material['privateKey'] = $secret; } if ($public_key) { @@ -99,10 +99,15 @@ final class PassphraseQueryConduitAPIMethod } break; case PassphrasePasswordCredentialType::CREDENTIAL_TYPE: - if ($secret) { + if ($secret !== null) { $material['password'] = $secret; } break; + case PassphraseTokenCredentialType::CREDENTIAL_TYPE: + if ($secret !== null) { + $material['token'] = $secret; + } + break; } if (!$allow_api) {