@pulumi/auth0 2.14.0-alpha.1663280530 → 2.14.0-alpha.1666810964
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action.d.ts +25 -72
- package/action.js +2 -50
- package/action.js.map +1 -1
- package/attackProtection.d.ts +9 -8
- package/attackProtection.js +4 -4
- package/attackProtection.js.map +1 -1
- package/branding.d.ts +31 -30
- package/branding.js +14 -8
- package/branding.js.map +1 -1
- package/brandingTheme.d.ts +156 -0
- package/brandingTheme.js +165 -0
- package/brandingTheme.js.map +1 -0
- package/client.d.ts +145 -126
- package/client.js +26 -22
- package/client.js.map +1 -1
- package/clientGrant.d.ts +12 -13
- package/clientGrant.js +3 -4
- package/clientGrant.js.map +1 -1
- package/config/vars.d.ts +22 -0
- package/config/vars.js +6 -0
- package/config/vars.js.map +1 -1
- package/connection.d.ts +256 -41
- package/connection.js +236 -4
- package/connection.js.map +1 -1
- package/customDomain.d.ts +42 -18
- package/customDomain.js +6 -3
- package/customDomain.js.map +1 -1
- package/customDomainVerification.d.ts +15 -9
- package/customDomainVerification.js +4 -4
- package/customDomainVerification.js.map +1 -1
- package/email.d.ts +37 -18
- package/email.js +23 -5
- package/email.js.map +1 -1
- package/emailTemplate.d.ts +29 -32
- package/emailTemplate.js +2 -5
- package/emailTemplate.js.map +1 -1
- package/getClient.d.ts +111 -6
- package/getClient.js +3 -1
- package/getClient.js.map +1 -1
- package/getGlobalClient.d.ts +98 -31
- package/getGlobalClient.js +3 -11
- package/getGlobalClient.js.map +1 -1
- package/getTenant.d.ts +3 -3
- package/getTenant.js +1 -1
- package/globalClient.d.ts +333 -2
- package/globalClient.js +7 -3
- package/globalClient.js.map +1 -1
- package/guardian.d.ts +32 -56
- package/guardian.js +3 -4
- package/guardian.js.map +1 -1
- package/hook.d.ts +12 -18
- package/hook.js +9 -10
- package/hook.js.map +1 -1
- package/index.d.ts +91 -30
- package/index.js +94 -101
- package/index.js.map +1 -1
- package/logStream.d.ts +34 -18
- package/logStream.js +17 -2
- package/logStream.js.map +1 -1
- package/organization.d.ts +22 -55
- package/organization.js +8 -17
- package/organization.js.map +1 -1
- package/organizationConnection.d.ts +7 -5
- package/organizationConnection.js +7 -5
- package/organizationConnection.js.map +1 -1
- package/organizationMember.d.ts +27 -15
- package/organizationMember.js +18 -6
- package/organizationMember.js.map +1 -1
- package/package.json +2 -2
- package/package.json.dev +2 -2
- package/prompt.d.ts +12 -12
- package/prompt.js +4 -4
- package/promptCustomText.d.ts +8 -9
- package/promptCustomText.js +2 -3
- package/promptCustomText.js.map +1 -1
- package/provider.d.ts +41 -0
- package/provider.js +1 -0
- package/provider.js.map +1 -1
- package/resourceServer.d.ts +47 -46
- package/resourceServer.js +4 -1
- package/resourceServer.js.map +1 -1
- package/role.d.ts +13 -17
- package/role.js +2 -4
- package/role.js.map +1 -1
- package/rule.d.ts +19 -25
- package/rule.js +6 -12
- package/rule.js.map +1 -1
- package/ruleConfig.d.ts +12 -14
- package/ruleConfig.js +9 -9
- package/ruleConfig.js.map +1 -1
- package/tenant.d.ts +91 -80
- package/tenant.js +35 -25
- package/tenant.js.map +1 -1
- package/triggerBinding.d.ts +19 -26
- package/triggerBinding.js +11 -16
- package/triggerBinding.js.map +1 -1
- package/types/index.js.map +1 -1
- package/types/input.d.ts +488 -425
- package/types/output.d.ts +500 -435
- package/user.d.ts +87 -44
- package/user.js +6 -6
- package/user.js.map +1 -1
- package/utilities.js +13 -1
- package/utilities.js.map +1 -1
package/connection.d.ts
CHANGED
|
@@ -1,13 +1,246 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
3
4
|
/**
|
|
4
|
-
* With Auth0, you can define sources of users, otherwise known as connections, which may include identity providers
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* With Auth0, you can define sources of users, otherwise known as connections, which may include identity providers (such as Google or LinkedIn), databases, or passwordless authentication methods. This resource allows you to configure and manage connections to be used with your clients and users.
|
|
6
|
+
*
|
|
7
|
+
* > The Auth0 dashboard displays only one connection per social provider. Although the Auth0 Management API allows the
|
|
8
|
+
* creation of multiple connections per strategy, the additional connections may not be visible in the Auth0 dashboard.
|
|
9
|
+
*
|
|
10
|
+
* ## Example Usage
|
|
11
|
+
* ### Google OAuth2 Connection
|
|
12
|
+
*
|
|
13
|
+
* > Your Auth0 account may be pre-configured with a `google-oauth2` connection.
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
18
|
+
*
|
|
19
|
+
* const googleOauth2 = new auth0.Connection("google_oauth2", {
|
|
20
|
+
* options: {
|
|
21
|
+
* allowedAudiences: [
|
|
22
|
+
* "example.com",
|
|
23
|
+
* "api.example.com",
|
|
24
|
+
* ],
|
|
25
|
+
* clientId: "<client-id>",
|
|
26
|
+
* clientSecret: "<client-secret>",
|
|
27
|
+
* scopes: [
|
|
28
|
+
* "email",
|
|
29
|
+
* "profile",
|
|
30
|
+
* "gmail",
|
|
31
|
+
* "youtube",
|
|
32
|
+
* ],
|
|
33
|
+
* setUserRootAttributes: "on_each_login",
|
|
34
|
+
* },
|
|
35
|
+
* strategy: "google-oauth2",
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
* ### Facebook Connection
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
43
|
+
*
|
|
44
|
+
* const facebook = new auth0.Connection("facebook", {
|
|
45
|
+
* options: {
|
|
46
|
+
* clientId: "<client-id>",
|
|
47
|
+
* clientSecret: "<client-secret>",
|
|
48
|
+
* scopes: [
|
|
49
|
+
* "public_profile",
|
|
50
|
+
* "email",
|
|
51
|
+
* "groups_access_member_info",
|
|
52
|
+
* "user_birthday",
|
|
53
|
+
* ],
|
|
54
|
+
* },
|
|
55
|
+
* strategy: "facebook",
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
* ### Apple Connection
|
|
59
|
+
*
|
|
60
|
+
* ```typescript
|
|
61
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
62
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
63
|
+
*
|
|
64
|
+
* const apple = new auth0.Connection("apple", {
|
|
65
|
+
* options: {
|
|
66
|
+
* clientId: "<client-id>",
|
|
67
|
+
* clientSecret: "<private-key>",
|
|
68
|
+
* keyId: "<key-id>",
|
|
69
|
+
* scopes: [
|
|
70
|
+
* "email",
|
|
71
|
+
* "name",
|
|
72
|
+
* ],
|
|
73
|
+
* teamId: "<team-id>",
|
|
74
|
+
* },
|
|
75
|
+
* strategy: "apple",
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
* ### LinkedIn Connection
|
|
79
|
+
*
|
|
80
|
+
* ```typescript
|
|
81
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
82
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
83
|
+
*
|
|
84
|
+
* const linkedin = new auth0.Connection("linkedin", {
|
|
85
|
+
* options: {
|
|
86
|
+
* clientId: "<client-id>",
|
|
87
|
+
* clientSecret: "<client-secret>",
|
|
88
|
+
* scopes: [
|
|
89
|
+
* "basic_profile",
|
|
90
|
+
* "profile",
|
|
91
|
+
* "email",
|
|
92
|
+
* ],
|
|
93
|
+
* strategyVersion: 2,
|
|
94
|
+
* },
|
|
95
|
+
* strategy: "linkedin",
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
* ### GitHub Connection
|
|
99
|
+
*
|
|
100
|
+
* ```typescript
|
|
101
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
102
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
103
|
+
*
|
|
104
|
+
* const github = new auth0.Connection("github", {
|
|
105
|
+
* options: {
|
|
106
|
+
* clientId: "<client-id>",
|
|
107
|
+
* clientSecret: "<client-secret>",
|
|
108
|
+
* scopes: [
|
|
109
|
+
* "email",
|
|
110
|
+
* "profile",
|
|
111
|
+
* "public_repo",
|
|
112
|
+
* "repo",
|
|
113
|
+
* ],
|
|
114
|
+
* },
|
|
115
|
+
* strategy: "github",
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
118
|
+
* ### SalesForce Connection
|
|
119
|
+
*
|
|
120
|
+
* ```typescript
|
|
121
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
122
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
123
|
+
*
|
|
124
|
+
* const salesforce = new auth0.Connection("salesforce", {
|
|
125
|
+
* options: {
|
|
126
|
+
* clientId: "<client-id>",
|
|
127
|
+
* clientSecret: "<client-secret>",
|
|
128
|
+
* communityBaseUrl: "https://salesforce.example.com",
|
|
129
|
+
* },
|
|
130
|
+
* strategy: "salesforce",
|
|
131
|
+
* });
|
|
132
|
+
* ```
|
|
133
|
+
* ### OAuth2 Connection
|
|
134
|
+
*
|
|
135
|
+
* ```typescript
|
|
136
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
137
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
138
|
+
*
|
|
139
|
+
* const oauth2 = new auth0.Connection("oauth2", {
|
|
140
|
+
* options: {
|
|
141
|
+
* authorizationEndpoint: "https://auth.example.com/oauth2/authorize",
|
|
142
|
+
* clientId: "<client-id>",
|
|
143
|
+
* clientSecret: "<client-secret>",
|
|
144
|
+
* pkceEnabled: true,
|
|
145
|
+
* scripts: {
|
|
146
|
+
* fetchUserProfile: ` function fetchUserProfile(accessToken, context, callback) {
|
|
147
|
+
* return callback(new Error("Whoops!"));
|
|
148
|
+
* }
|
|
149
|
+
* `,
|
|
150
|
+
* },
|
|
151
|
+
* tokenEndpoint: "https://auth.example.com/oauth2/token",
|
|
152
|
+
* },
|
|
153
|
+
* strategy: "oauth2",
|
|
154
|
+
* });
|
|
155
|
+
* ```
|
|
156
|
+
* ### SMS Connection
|
|
157
|
+
*
|
|
158
|
+
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms".
|
|
159
|
+
*
|
|
160
|
+
* ```typescript
|
|
161
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
162
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
163
|
+
*
|
|
164
|
+
* const sms = new auth0.Connection("sms", {
|
|
165
|
+
* isDomainConnection: false,
|
|
166
|
+
* options: {
|
|
167
|
+
* bruteForceProtection: true,
|
|
168
|
+
* disableSignup: false,
|
|
169
|
+
* forwardRequestInfo: true,
|
|
170
|
+
* from: "+15555555555",
|
|
171
|
+
* gatewayAuthentication: {
|
|
172
|
+
* audience: "https://somewhere.com/sms-gateway",
|
|
173
|
+
* method: "bearer",
|
|
174
|
+
* secret: "4e2680bb74ec2ae24736476dd37ed6c2",
|
|
175
|
+
* secretBase64Encoded: false,
|
|
176
|
+
* subject: "test.us.auth0.com:sms",
|
|
177
|
+
* },
|
|
178
|
+
* gatewayUrl: "https://somewhere.com/sms-gateway",
|
|
179
|
+
* name: "sms",
|
|
180
|
+
* provider: "sms_gateway",
|
|
181
|
+
* syntax: "md_with_macros",
|
|
182
|
+
* template: "@@password@@",
|
|
183
|
+
* totp: {
|
|
184
|
+
* length: 6,
|
|
185
|
+
* timeStep: 300,
|
|
186
|
+
* },
|
|
187
|
+
* },
|
|
188
|
+
* strategy: "sms",
|
|
189
|
+
* });
|
|
190
|
+
* ```
|
|
191
|
+
* ### Email Connection
|
|
192
|
+
*
|
|
193
|
+
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "email".
|
|
194
|
+
*
|
|
195
|
+
* ```typescript
|
|
196
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
197
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
198
|
+
*
|
|
199
|
+
* const passwordlessEmail = new auth0.Connection("passwordless_email", {
|
|
200
|
+
* options: {
|
|
201
|
+
* authParams: {
|
|
202
|
+
* response_type: "code",
|
|
203
|
+
* scope: "openid email profile offline_access",
|
|
204
|
+
* },
|
|
205
|
+
* bruteForceProtection: true,
|
|
206
|
+
* disableSignup: false,
|
|
207
|
+
* from: "{{ application.name }} <root@auth0.com>",
|
|
208
|
+
* nonPersistentAttrs: [],
|
|
209
|
+
* setUserRootAttributes: [],
|
|
210
|
+
* subject: "Welcome to {{ application.name }}",
|
|
211
|
+
* syntax: "liquid",
|
|
212
|
+
* template: "<html>This is the body of the email</html>",
|
|
213
|
+
* totp: {
|
|
214
|
+
* length: 6,
|
|
215
|
+
* timeStep: 300,
|
|
216
|
+
* },
|
|
217
|
+
* },
|
|
218
|
+
* strategy: "email",
|
|
219
|
+
* });
|
|
220
|
+
* ```
|
|
221
|
+
* ### WindowsLive Connection
|
|
222
|
+
*
|
|
223
|
+
* ```typescript
|
|
224
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
225
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
226
|
+
*
|
|
227
|
+
* const windowslive = new auth0.Connection("windowslive", {
|
|
228
|
+
* options: {
|
|
229
|
+
* clientId: "<client-id>",
|
|
230
|
+
* clientSecret: "<client-secret>",
|
|
231
|
+
* scopes: [
|
|
232
|
+
* "signin",
|
|
233
|
+
* "graph_user",
|
|
234
|
+
* ],
|
|
235
|
+
* strategyVersion: 2,
|
|
236
|
+
* },
|
|
237
|
+
* strategy: "windowslive",
|
|
238
|
+
* });
|
|
239
|
+
* ```
|
|
7
240
|
*
|
|
8
241
|
* ## Import
|
|
9
242
|
*
|
|
10
|
-
* Connections can be imported using their
|
|
243
|
+
* Connections can be imported using their ID. # Example
|
|
11
244
|
*
|
|
12
245
|
* ```sh
|
|
13
246
|
* $ pulumi import auth0:index/connection:Connection google con_a17f21fdb24d48a0
|
|
@@ -30,11 +263,11 @@ export declare class Connection extends pulumi.CustomResource {
|
|
|
30
263
|
*/
|
|
31
264
|
static isInstance(obj: any): obj is Connection;
|
|
32
265
|
/**
|
|
33
|
-
* Name used in login screen
|
|
266
|
+
* Name used in login screen.
|
|
34
267
|
*/
|
|
35
268
|
readonly displayName: pulumi.Output<string | undefined>;
|
|
36
269
|
/**
|
|
37
|
-
* IDs of the clients for which the connection is enabled.
|
|
270
|
+
* IDs of the clients for which the connection is enabled.
|
|
38
271
|
*/
|
|
39
272
|
readonly enabledClients: pulumi.Output<string[]>;
|
|
40
273
|
/**
|
|
@@ -52,28 +285,22 @@ export declare class Connection extends pulumi.CustomResource {
|
|
|
52
285
|
*/
|
|
53
286
|
readonly name: pulumi.Output<string>;
|
|
54
287
|
/**
|
|
55
|
-
* Configuration settings for connection options.
|
|
288
|
+
* Configuration settings for connection options.
|
|
56
289
|
*/
|
|
57
290
|
readonly options: pulumi.Output<outputs.ConnectionOptions>;
|
|
58
291
|
/**
|
|
59
|
-
* Defines the realms for which the connection will be used (
|
|
292
|
+
* Defines the realms for which the connection will be used (e.g., email domains). If not specified, the connection name is added as the realm.
|
|
60
293
|
*/
|
|
61
294
|
readonly realms: pulumi.Output<string[]>;
|
|
62
295
|
/**
|
|
63
|
-
* Display connection as a button. Only available
|
|
296
|
+
* Display connection as a button. Only available on enterprise connections.
|
|
64
297
|
*/
|
|
65
298
|
readonly showAsButton: pulumi.Output<boolean | undefined>;
|
|
66
299
|
/**
|
|
67
|
-
* Type of the connection, which indicates the identity provider.
|
|
300
|
+
* Type of the connection, which indicates the identity provider.
|
|
68
301
|
*/
|
|
69
302
|
readonly strategy: pulumi.Output<string>;
|
|
70
|
-
/**
|
|
71
|
-
* Version 1 is deprecated, use version 2.
|
|
72
|
-
*/
|
|
73
303
|
readonly strategyVersion: pulumi.Output<string>;
|
|
74
|
-
/**
|
|
75
|
-
* Validation of the minimum and maximum values allowed for a user to have as username. For details, see Validation.
|
|
76
|
-
*/
|
|
77
304
|
readonly validation: pulumi.Output<{
|
|
78
305
|
[key: string]: string;
|
|
79
306
|
} | undefined>;
|
|
@@ -91,11 +318,11 @@ export declare class Connection extends pulumi.CustomResource {
|
|
|
91
318
|
*/
|
|
92
319
|
export interface ConnectionState {
|
|
93
320
|
/**
|
|
94
|
-
* Name used in login screen
|
|
321
|
+
* Name used in login screen.
|
|
95
322
|
*/
|
|
96
323
|
displayName?: pulumi.Input<string>;
|
|
97
324
|
/**
|
|
98
|
-
* IDs of the clients for which the connection is enabled.
|
|
325
|
+
* IDs of the clients for which the connection is enabled.
|
|
99
326
|
*/
|
|
100
327
|
enabledClients?: pulumi.Input<pulumi.Input<string>[]>;
|
|
101
328
|
/**
|
|
@@ -113,28 +340,22 @@ export interface ConnectionState {
|
|
|
113
340
|
*/
|
|
114
341
|
name?: pulumi.Input<string>;
|
|
115
342
|
/**
|
|
116
|
-
* Configuration settings for connection options.
|
|
343
|
+
* Configuration settings for connection options.
|
|
117
344
|
*/
|
|
118
345
|
options?: pulumi.Input<inputs.ConnectionOptions>;
|
|
119
346
|
/**
|
|
120
|
-
* Defines the realms for which the connection will be used (
|
|
347
|
+
* Defines the realms for which the connection will be used (e.g., email domains). If not specified, the connection name is added as the realm.
|
|
121
348
|
*/
|
|
122
349
|
realms?: pulumi.Input<pulumi.Input<string>[]>;
|
|
123
350
|
/**
|
|
124
|
-
* Display connection as a button. Only available
|
|
351
|
+
* Display connection as a button. Only available on enterprise connections.
|
|
125
352
|
*/
|
|
126
353
|
showAsButton?: pulumi.Input<boolean>;
|
|
127
354
|
/**
|
|
128
|
-
* Type of the connection, which indicates the identity provider.
|
|
355
|
+
* Type of the connection, which indicates the identity provider.
|
|
129
356
|
*/
|
|
130
357
|
strategy?: pulumi.Input<string>;
|
|
131
|
-
/**
|
|
132
|
-
* Version 1 is deprecated, use version 2.
|
|
133
|
-
*/
|
|
134
358
|
strategyVersion?: pulumi.Input<string>;
|
|
135
|
-
/**
|
|
136
|
-
* Validation of the minimum and maximum values allowed for a user to have as username. For details, see Validation.
|
|
137
|
-
*/
|
|
138
359
|
validation?: pulumi.Input<{
|
|
139
360
|
[key: string]: pulumi.Input<string>;
|
|
140
361
|
}>;
|
|
@@ -144,11 +365,11 @@ export interface ConnectionState {
|
|
|
144
365
|
*/
|
|
145
366
|
export interface ConnectionArgs {
|
|
146
367
|
/**
|
|
147
|
-
* Name used in login screen
|
|
368
|
+
* Name used in login screen.
|
|
148
369
|
*/
|
|
149
370
|
displayName?: pulumi.Input<string>;
|
|
150
371
|
/**
|
|
151
|
-
* IDs of the clients for which the connection is enabled.
|
|
372
|
+
* IDs of the clients for which the connection is enabled.
|
|
152
373
|
*/
|
|
153
374
|
enabledClients?: pulumi.Input<pulumi.Input<string>[]>;
|
|
154
375
|
/**
|
|
@@ -166,28 +387,22 @@ export interface ConnectionArgs {
|
|
|
166
387
|
*/
|
|
167
388
|
name?: pulumi.Input<string>;
|
|
168
389
|
/**
|
|
169
|
-
* Configuration settings for connection options.
|
|
390
|
+
* Configuration settings for connection options.
|
|
170
391
|
*/
|
|
171
392
|
options?: pulumi.Input<inputs.ConnectionOptions>;
|
|
172
393
|
/**
|
|
173
|
-
* Defines the realms for which the connection will be used (
|
|
394
|
+
* Defines the realms for which the connection will be used (e.g., email domains). If not specified, the connection name is added as the realm.
|
|
174
395
|
*/
|
|
175
396
|
realms?: pulumi.Input<pulumi.Input<string>[]>;
|
|
176
397
|
/**
|
|
177
|
-
* Display connection as a button. Only available
|
|
398
|
+
* Display connection as a button. Only available on enterprise connections.
|
|
178
399
|
*/
|
|
179
400
|
showAsButton?: pulumi.Input<boolean>;
|
|
180
401
|
/**
|
|
181
|
-
* Type of the connection, which indicates the identity provider.
|
|
402
|
+
* Type of the connection, which indicates the identity provider.
|
|
182
403
|
*/
|
|
183
404
|
strategy: pulumi.Input<string>;
|
|
184
|
-
/**
|
|
185
|
-
* Version 1 is deprecated, use version 2.
|
|
186
|
-
*/
|
|
187
405
|
strategyVersion?: pulumi.Input<string>;
|
|
188
|
-
/**
|
|
189
|
-
* Validation of the minimum and maximum values allowed for a user to have as username. For details, see Validation.
|
|
190
|
-
*/
|
|
191
406
|
validation?: pulumi.Input<{
|
|
192
407
|
[key: string]: pulumi.Input<string>;
|
|
193
408
|
}>;
|
package/connection.js
CHANGED
|
@@ -6,13 +6,245 @@ exports.Connection = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
* With Auth0, you can define sources of users, otherwise known as connections, which may include identity providers
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* With Auth0, you can define sources of users, otherwise known as connections, which may include identity providers (such as Google or LinkedIn), databases, or passwordless authentication methods. This resource allows you to configure and manage connections to be used with your clients and users.
|
|
10
|
+
*
|
|
11
|
+
* > The Auth0 dashboard displays only one connection per social provider. Although the Auth0 Management API allows the
|
|
12
|
+
* creation of multiple connections per strategy, the additional connections may not be visible in the Auth0 dashboard.
|
|
13
|
+
*
|
|
14
|
+
* ## Example Usage
|
|
15
|
+
* ### Google OAuth2 Connection
|
|
16
|
+
*
|
|
17
|
+
* > Your Auth0 account may be pre-configured with a `google-oauth2` connection.
|
|
18
|
+
*
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
21
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
22
|
+
*
|
|
23
|
+
* const googleOauth2 = new auth0.Connection("google_oauth2", {
|
|
24
|
+
* options: {
|
|
25
|
+
* allowedAudiences: [
|
|
26
|
+
* "example.com",
|
|
27
|
+
* "api.example.com",
|
|
28
|
+
* ],
|
|
29
|
+
* clientId: "<client-id>",
|
|
30
|
+
* clientSecret: "<client-secret>",
|
|
31
|
+
* scopes: [
|
|
32
|
+
* "email",
|
|
33
|
+
* "profile",
|
|
34
|
+
* "gmail",
|
|
35
|
+
* "youtube",
|
|
36
|
+
* ],
|
|
37
|
+
* setUserRootAttributes: "on_each_login",
|
|
38
|
+
* },
|
|
39
|
+
* strategy: "google-oauth2",
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
* ### Facebook Connection
|
|
43
|
+
*
|
|
44
|
+
* ```typescript
|
|
45
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
46
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
47
|
+
*
|
|
48
|
+
* const facebook = new auth0.Connection("facebook", {
|
|
49
|
+
* options: {
|
|
50
|
+
* clientId: "<client-id>",
|
|
51
|
+
* clientSecret: "<client-secret>",
|
|
52
|
+
* scopes: [
|
|
53
|
+
* "public_profile",
|
|
54
|
+
* "email",
|
|
55
|
+
* "groups_access_member_info",
|
|
56
|
+
* "user_birthday",
|
|
57
|
+
* ],
|
|
58
|
+
* },
|
|
59
|
+
* strategy: "facebook",
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
* ### Apple Connection
|
|
63
|
+
*
|
|
64
|
+
* ```typescript
|
|
65
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
66
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
67
|
+
*
|
|
68
|
+
* const apple = new auth0.Connection("apple", {
|
|
69
|
+
* options: {
|
|
70
|
+
* clientId: "<client-id>",
|
|
71
|
+
* clientSecret: "<private-key>",
|
|
72
|
+
* keyId: "<key-id>",
|
|
73
|
+
* scopes: [
|
|
74
|
+
* "email",
|
|
75
|
+
* "name",
|
|
76
|
+
* ],
|
|
77
|
+
* teamId: "<team-id>",
|
|
78
|
+
* },
|
|
79
|
+
* strategy: "apple",
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
* ### LinkedIn Connection
|
|
83
|
+
*
|
|
84
|
+
* ```typescript
|
|
85
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
86
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
87
|
+
*
|
|
88
|
+
* const linkedin = new auth0.Connection("linkedin", {
|
|
89
|
+
* options: {
|
|
90
|
+
* clientId: "<client-id>",
|
|
91
|
+
* clientSecret: "<client-secret>",
|
|
92
|
+
* scopes: [
|
|
93
|
+
* "basic_profile",
|
|
94
|
+
* "profile",
|
|
95
|
+
* "email",
|
|
96
|
+
* ],
|
|
97
|
+
* strategyVersion: 2,
|
|
98
|
+
* },
|
|
99
|
+
* strategy: "linkedin",
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
* ### GitHub Connection
|
|
103
|
+
*
|
|
104
|
+
* ```typescript
|
|
105
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
106
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
107
|
+
*
|
|
108
|
+
* const github = new auth0.Connection("github", {
|
|
109
|
+
* options: {
|
|
110
|
+
* clientId: "<client-id>",
|
|
111
|
+
* clientSecret: "<client-secret>",
|
|
112
|
+
* scopes: [
|
|
113
|
+
* "email",
|
|
114
|
+
* "profile",
|
|
115
|
+
* "public_repo",
|
|
116
|
+
* "repo",
|
|
117
|
+
* ],
|
|
118
|
+
* },
|
|
119
|
+
* strategy: "github",
|
|
120
|
+
* });
|
|
121
|
+
* ```
|
|
122
|
+
* ### SalesForce Connection
|
|
123
|
+
*
|
|
124
|
+
* ```typescript
|
|
125
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
126
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
127
|
+
*
|
|
128
|
+
* const salesforce = new auth0.Connection("salesforce", {
|
|
129
|
+
* options: {
|
|
130
|
+
* clientId: "<client-id>",
|
|
131
|
+
* clientSecret: "<client-secret>",
|
|
132
|
+
* communityBaseUrl: "https://salesforce.example.com",
|
|
133
|
+
* },
|
|
134
|
+
* strategy: "salesforce",
|
|
135
|
+
* });
|
|
136
|
+
* ```
|
|
137
|
+
* ### OAuth2 Connection
|
|
138
|
+
*
|
|
139
|
+
* ```typescript
|
|
140
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
141
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
142
|
+
*
|
|
143
|
+
* const oauth2 = new auth0.Connection("oauth2", {
|
|
144
|
+
* options: {
|
|
145
|
+
* authorizationEndpoint: "https://auth.example.com/oauth2/authorize",
|
|
146
|
+
* clientId: "<client-id>",
|
|
147
|
+
* clientSecret: "<client-secret>",
|
|
148
|
+
* pkceEnabled: true,
|
|
149
|
+
* scripts: {
|
|
150
|
+
* fetchUserProfile: ` function fetchUserProfile(accessToken, context, callback) {
|
|
151
|
+
* return callback(new Error("Whoops!"));
|
|
152
|
+
* }
|
|
153
|
+
* `,
|
|
154
|
+
* },
|
|
155
|
+
* tokenEndpoint: "https://auth.example.com/oauth2/token",
|
|
156
|
+
* },
|
|
157
|
+
* strategy: "oauth2",
|
|
158
|
+
* });
|
|
159
|
+
* ```
|
|
160
|
+
* ### SMS Connection
|
|
161
|
+
*
|
|
162
|
+
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms".
|
|
163
|
+
*
|
|
164
|
+
* ```typescript
|
|
165
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
166
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
167
|
+
*
|
|
168
|
+
* const sms = new auth0.Connection("sms", {
|
|
169
|
+
* isDomainConnection: false,
|
|
170
|
+
* options: {
|
|
171
|
+
* bruteForceProtection: true,
|
|
172
|
+
* disableSignup: false,
|
|
173
|
+
* forwardRequestInfo: true,
|
|
174
|
+
* from: "+15555555555",
|
|
175
|
+
* gatewayAuthentication: {
|
|
176
|
+
* audience: "https://somewhere.com/sms-gateway",
|
|
177
|
+
* method: "bearer",
|
|
178
|
+
* secret: "4e2680bb74ec2ae24736476dd37ed6c2",
|
|
179
|
+
* secretBase64Encoded: false,
|
|
180
|
+
* subject: "test.us.auth0.com:sms",
|
|
181
|
+
* },
|
|
182
|
+
* gatewayUrl: "https://somewhere.com/sms-gateway",
|
|
183
|
+
* name: "sms",
|
|
184
|
+
* provider: "sms_gateway",
|
|
185
|
+
* syntax: "md_with_macros",
|
|
186
|
+
* template: "@@password@@",
|
|
187
|
+
* totp: {
|
|
188
|
+
* length: 6,
|
|
189
|
+
* timeStep: 300,
|
|
190
|
+
* },
|
|
191
|
+
* },
|
|
192
|
+
* strategy: "sms",
|
|
193
|
+
* });
|
|
194
|
+
* ```
|
|
195
|
+
* ### Email Connection
|
|
196
|
+
*
|
|
197
|
+
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "email".
|
|
198
|
+
*
|
|
199
|
+
* ```typescript
|
|
200
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
201
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
202
|
+
*
|
|
203
|
+
* const passwordlessEmail = new auth0.Connection("passwordless_email", {
|
|
204
|
+
* options: {
|
|
205
|
+
* authParams: {
|
|
206
|
+
* response_type: "code",
|
|
207
|
+
* scope: "openid email profile offline_access",
|
|
208
|
+
* },
|
|
209
|
+
* bruteForceProtection: true,
|
|
210
|
+
* disableSignup: false,
|
|
211
|
+
* from: "{{ application.name }} <root@auth0.com>",
|
|
212
|
+
* nonPersistentAttrs: [],
|
|
213
|
+
* setUserRootAttributes: [],
|
|
214
|
+
* subject: "Welcome to {{ application.name }}",
|
|
215
|
+
* syntax: "liquid",
|
|
216
|
+
* template: "<html>This is the body of the email</html>",
|
|
217
|
+
* totp: {
|
|
218
|
+
* length: 6,
|
|
219
|
+
* timeStep: 300,
|
|
220
|
+
* },
|
|
221
|
+
* },
|
|
222
|
+
* strategy: "email",
|
|
223
|
+
* });
|
|
224
|
+
* ```
|
|
225
|
+
* ### WindowsLive Connection
|
|
226
|
+
*
|
|
227
|
+
* ```typescript
|
|
228
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
229
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
230
|
+
*
|
|
231
|
+
* const windowslive = new auth0.Connection("windowslive", {
|
|
232
|
+
* options: {
|
|
233
|
+
* clientId: "<client-id>",
|
|
234
|
+
* clientSecret: "<client-secret>",
|
|
235
|
+
* scopes: [
|
|
236
|
+
* "signin",
|
|
237
|
+
* "graph_user",
|
|
238
|
+
* ],
|
|
239
|
+
* strategyVersion: 2,
|
|
240
|
+
* },
|
|
241
|
+
* strategy: "windowslive",
|
|
242
|
+
* });
|
|
243
|
+
* ```
|
|
12
244
|
*
|
|
13
245
|
* ## Import
|
|
14
246
|
*
|
|
15
|
-
* Connections can be imported using their
|
|
247
|
+
* Connections can be imported using their ID. # Example
|
|
16
248
|
*
|
|
17
249
|
* ```sh
|
|
18
250
|
* $ pulumi import auth0:index/connection:Connection google con_a17f21fdb24d48a0
|
package/connection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../connection.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../connection.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoPG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IA2EjD,YAAY,IAAY,EAAE,WAA8C,EAAE,IAAmC;QACzG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA0C,CAAC;YACzD,cAAc,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACtE,cAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CA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