Cred.defaultNew
var cred = Cred.defaultNew();
| Returns | |
|---|---|
| Cred |
Cred.sshKeyFromAgent
var cred = Cred.sshKeyFromAgent(username);
| Parameters | Type | |
|---|---|---|
| username | String | username to use to authenticate |
| Returns | |
|---|---|
| Cred | The newly created credential object. |
Cred.sshKeyMemoryNew
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
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
Cred.usernameNew(username).then(function(cred) {
// Use cred
});
| Parameters | Type | |
|---|---|---|
| username | String |
| Returns | |
|---|---|
| Cred |
Cred.userpassPlaintextNew
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
var result = cred.hasUsername();
| Returns | |
|---|---|
| Number | 1 if the credential object has non-NULL username, 0 otherwise |
Cred.TYPE
| 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 |