2020-03-13 18:22:36 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-03-13 18:22:36 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class GoogleOAuth2Api implements ICredentialType {
|
|
|
|
name = 'googleOAuth2Api';
|
|
|
|
extends = [
|
|
|
|
'oAuth2Api',
|
|
|
|
];
|
|
|
|
displayName = 'Google OAuth2 API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'google';
|
2021-09-11 01:15:36 -07:00
|
|
|
icon = 'file:Google.svg';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-03-13 18:22:36 -07:00
|
|
|
{
|
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-03-13 18:22:36 -07:00
|
|
|
default: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-03-13 18:22:36 -07:00
|
|
|
default: 'https://oauth2.googleapis.com/token',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth URI Query Parameters',
|
|
|
|
name: 'authQueryParameters',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-09-17 14:10:13 -07:00
|
|
|
default: 'access_type=offline&prompt=consent',
|
2020-03-13 18:22:36 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Authentication',
|
|
|
|
name: 'authentication',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-03-13 18:22:36 -07:00
|
|
|
default: 'body',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|