Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15451140
D14284.id34482.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D14284.id34482.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1512,6 +1512,7 @@
'PassphraseSchemaSpec' => 'applications/passphrase/storage/PassphraseSchemaSpec.php',
'PassphraseSearchIndexer' => 'applications/passphrase/search/PassphraseSearchIndexer.php',
'PassphraseSecret' => 'applications/passphrase/storage/PassphraseSecret.php',
+ 'PassphraseTokenCredentialType' => 'applications/passphrase/credentialtype/PassphraseTokenCredentialType.php',
'PasteConduitAPIMethod' => 'applications/paste/conduit/PasteConduitAPIMethod.php',
'PasteCreateConduitAPIMethod' => 'applications/paste/conduit/PasteCreateConduitAPIMethod.php',
'PasteCreateMailReceiver' => 'applications/paste/mail/PasteCreateMailReceiver.php',
@@ -5413,6 +5414,7 @@
'PassphraseSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'PassphraseSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
'PassphraseSecret' => 'PassphraseDAO',
+ 'PassphraseTokenCredentialType' => 'PassphraseCredentialType',
'PasteConduitAPIMethod' => 'ConduitAPIMethod',
'PasteCreateConduitAPIMethod' => 'PasteConduitAPIMethod',
'PasteCreateMailReceiver' => 'PhabricatorMailReceiver',
diff --git a/src/applications/passphrase/credentialtype/PassphraseTokenCredentialType.php b/src/applications/passphrase/credentialtype/PassphraseTokenCredentialType.php
new file mode 100644
--- /dev/null
+++ b/src/applications/passphrase/credentialtype/PassphraseTokenCredentialType.php
@@ -0,0 +1,37 @@
+<?php
+
+final class PassphraseTokenCredentialType
+ extends PassphraseCredentialType {
+
+ const CREDENTIAL_TYPE = 'token';
+ const PROVIDES_TYPE = 'provides/token';
+
+ public function getCredentialType() {
+ return self::CREDENTIAL_TYPE;
+ }
+
+ public function getProvidesType() {
+ return self::PROVIDES_TYPE;
+ }
+
+ public function getCredentialTypeName() {
+ return pht('Token');
+ }
+
+ public function getCredentialTypeDescription() {
+ return pht('Store an API token.');
+ }
+
+ public function getSecretLabel() {
+ return pht('Token');
+ }
+
+ public function newSecretControl() {
+ return id(new AphrontFormTextControl());
+ }
+
+ public function shouldRequireUsername() {
+ return false;
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 29, 8:22 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7726064
Default Alt Text
D14284.id34482.diff (2 KB)
Attached To
Mode
D14284: Add a "Token" Credential type
Attached
Detach File
Event Timeline
Log In to Comment