forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOktaApi.credentials.ts
57 lines (49 loc) · 1.01 KB
/
OktaApi.credentials.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class OktaApi implements ICredentialType {
name = 'oktaApi';
displayName = 'Okta API';
documentationUrl = 'okta';
icon = 'file:icons/Okta.svg';
httpRequestNode = {
name: 'Okta',
docsUrl: 'https://developer.okta.com/docs/reference/',
apiBaseUrl: '',
};
properties: INodeProperties[] = [
{
displayName: 'URL',
name: 'url',
type: 'string',
required: true,
default: '',
placeholder: 'https://dev-123456.okta.com',
},
{
displayName: 'SSWS Access Token',
name: 'accessToken',
type: 'string',
typeOptions: { password: true },
required: true,
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=SSWS {{$credentials.accessToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials.url}}',
url: '/api/v1/api-tokens',
},
};
}