UNPKG

780 BTypeScriptView Raw
1export namespace Credential {
2 const enum TYPE {
3 USERPASS_PLAINTEXT = 1,
4 SSH_KEY = 2,
5 SSH_CUSTOM = 4,
6 DEFAULT = 8,
7 SSH_INTERACTIVE = 16,
8 USERNAME = 32,
9 SSH_MEMORY = 64,
10 }
11}
12
13export class Credential {
14 static defaultNew(): Credential;
15 static sshKeyFromAgent(username: string): Credential;
16 static sshKeyMemoryNew(
17 username: string,
18 publicKey: string,
19 privateKey: string,
20 passphrase: string,
21 ): Promise<Credential>;
22 static sshKeyNew(username: string, publicKey: string, privateKey: string, passphrase: string): Credential;
23 static usernameNew(username: string): Promise<Credential>;
24 static userpassPlaintextNew(username: string, password: string): Credential;
25}