Extend googleApi credentials to support user impersonification (#1304)

*  Extend googleApi credentials to support user impersonification

*  Add service account authentication to Gmail

*  Minor improvements

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza
2021-01-10 14:49:47 -05:00
committed by GitHub
parent a7dee0aba7
commit 76cee5577b
6 changed files with 130 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ export class GoogleApi implements ICredentialType {
documentationUrl = 'google';
properties = [
{
displayName: 'Email',
displayName: 'Service Account Email',
name: 'email',
type: 'string' as NodePropertyTypes,
default: '',
@@ -25,5 +25,25 @@ export class GoogleApi implements ICredentialType {
default: '',
description: 'Use the multiline editor. Make sure there are exactly 3 lines.<br />-----BEGIN PRIVATE KEY-----<br />KEY IN A SINGLE LINE<br />-----END PRIVATE KEY-----',
},
{
displayName: ' Impersonate a User',
name: 'inpersonate',
type: 'boolean' as NodePropertyTypes,
default: false,
},
{
displayName: 'Email',
name: 'delegatedEmail',
type: 'string' as NodePropertyTypes,
default: '',
displayOptions: {
show: {
inpersonate: [
true,
],
},
},
description: 'The email address of the user for which the application is requesting delegated access.',
},
];
}