Add private key and passphrase fields to SFTP credentials (#1136)

*  Add private key and passphrase fields to credentials

*  Small improvement
This commit is contained in:
Ricardo Espinoza 2020-11-12 13:23:55 -05:00 committed by GitHub
parent f3874b5ed9
commit 042028fb5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -38,5 +38,27 @@ export class Sftp implements ICredentialType {
}, },
default: '', default: '',
}, },
{
displayName: 'Private Key',
name: 'privateKey',
required: true,
type: 'string' as NodePropertyTypes,
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
description: 'String that contains a private key for either key-based or hostbased user authentication (OpenSSH format).',
},
{
displayName: 'Passphrase',
name: 'passphrase',
typeOptions: {
password: true,
},
required: true,
type: 'string' as NodePropertyTypes,
default: '',
description: 'For an encrypted private key, this is the passphrase used to decrypt it',
},
]; ];
} }

View file

@ -288,6 +288,8 @@ export class Ftp implements INodeType {
port: credentials.port as number, port: credentials.port as number,
username: credentials.username as string, username: credentials.username as string,
password: credentials.password as string, password: credentials.password as string,
privateKey: credentials.privateKey as string | undefined,
passphrase: credentials.passphrase as string | undefined,
}); });
} else { } else {