mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-17 01:54:06 -08:00
63 lines
1.5 KiB
TypeScript
63 lines
1.5 KiB
TypeScript
|
import {
|
||
|
ICredentialType,
|
||
|
NodePropertyTypes,
|
||
|
} from 'n8n-workflow';
|
||
|
|
||
|
export class ServiceNowOAuth2Api implements ICredentialType {
|
||
|
name = 'serviceNowOAuth2Api';
|
||
|
extends = [
|
||
|
'oAuth2Api',
|
||
|
];
|
||
|
displayName = 'ServiceNow OAuth2 API';
|
||
|
documentationUrl = 'serviceNow';
|
||
|
properties = [
|
||
|
{
|
||
|
displayName: 'Subdomain',
|
||
|
name: 'subdomain',
|
||
|
type: 'string' as NodePropertyTypes,
|
||
|
default: '',
|
||
|
placeholder: 'n8n',
|
||
|
description: 'The subdomain of your ServiceNow environment',
|
||
|
required: true,
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Authorization URL',
|
||
|
name: 'authUrl',
|
||
|
type: 'hidden' as NodePropertyTypes,
|
||
|
default: '=https://{{$self["subdomain"]}}.service-now.com/oauth_auth.do',
|
||
|
required: true,
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Access Token URL',
|
||
|
name: 'accessTokenUrl',
|
||
|
type: 'hidden' as NodePropertyTypes,
|
||
|
default: '=https://{{$self["subdomain"]}}.service-now.com/oauth_token.do',
|
||
|
required: true,
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Scope',
|
||
|
name: 'scope',
|
||
|
type: 'hidden' as NodePropertyTypes,
|
||
|
default: 'useraccount',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Auth URI Query Parameters',
|
||
|
name: 'authQueryParameters',
|
||
|
type: 'hidden' as NodePropertyTypes,
|
||
|
default: 'response_type=code',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Auth URI Query Parameters',
|
||
|
name: 'authQueryParameters',
|
||
|
type: 'hidden' as NodePropertyTypes,
|
||
|
default: 'grant_type=authorization_code',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Authentication',
|
||
|
name: 'authentication',
|
||
|
type: 'hidden' as NodePropertyTypes,
|
||
|
default: 'header',
|
||
|
},
|
||
|
];
|
||
|
}
|