1 | export 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 |
|
13 | export class Credential {
|
14 | static defaultNew(): Credential;
|
15 | static sshKeyFromAgent(username: string): Credential;
|
16 | static sshKeyMemoryNew(username: string, publicKey: string, privateKey: string, passphrase: string): Promise<Credential>;
|
17 | static sshKeyNew(username: string, publicKey: string, privateKey: string, passphrase: string): Credential;
|
18 | static usernameNew(username: string): Promise<Credential>;
|
19 | static userpassPlaintextNew(username: string, password: string): Credential;
|
20 | }
|