Skip to content

Latest commit

 

History

History
139 lines (108 loc) · 3.8 KB

File metadata and controls

139 lines (108 loc) · 3.8 KB
layout default
menu_item api
title Cred
description Version 0.26.1
return_to
API Documentation Index
/api/
sections
defaultNew sshKeyFromAgent sshKeyMemoryNew sshKeyNew usernameNew userpassPlaintextNew #hasUsername TYPE Instance Variables
#defaultNew
#sshKeyFromAgent
#sshKeyMemoryNew
#sshKeyNew
#usernameNew
#userpassPlaintextNew
#hasUsername
#TYPE
#ivars

Cred.defaultNew Sync

var cred = Cred.defaultNew();
Returns
Cred

Cred.sshKeyFromAgent Sync

var cred = Cred.sshKeyFromAgent(username);
Parameters Type
username String username to use to authenticate
Returns
Cred The newly created credential object.

Cred.sshKeyMemoryNew Async

Cred.sshKeyMemoryNew(username, publickey, privatekey, passphrase).then(function(cred) {
  // Use cred
});
Parameters Type
username String username to use to authenticate.
publickey String The public key of the credential.
privatekey String The private key of the credential.
passphrase String The passphrase of the credential.
Returns
Cred The newly created credential object.

Cred.sshKeyNew Sync

var cred = Cred.sshKeyNew(username, publickey, privatekey, passphrase);
Parameters Type
username String username to use to authenticate
publickey String The path to the public key of the credential.
privatekey String The path to the private key of the credential.
passphrase String The passphrase of the credential.
Returns
Cred The newly created credential object.

Cred.usernameNew Async

Cred.usernameNew(username).then(function(cred) {
  // Use cred
});
Parameters Type
username String
Returns
Cred

Cred.userpassPlaintextNew Sync

var cred = Cred.userpassPlaintextNew(username, password);
Parameters Type
username String The username of the credential.
password String The password of the credential.
Returns
Cred The newly created credential object.

Cred#hasUsername Sync

var result = cred.hasUsername();
Returns
Number 1 if the credential object has non-NULL username, 0 otherwise

Cred.TYPE ENUM

| Flag | Value | | --- | --- | --- | | Cred.TYPE.USERPASS_PLAINTEXT | 1 | | Cred.TYPE.SSH_KEY | 2 | | Cred.TYPE.SSH_CUSTOM | 4 | | Cred.TYPE.DEFAULT | 8 | | Cred.TYPE.SSH_INTERACTIVE | 16 | | Cred.TYPE.USERNAME | 32 | | Cred.TYPE.SSH_MEMORY | 64 |

Instance Variables

Variable Type Description
credtype Number