-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathAsyncClientsClient.java
More file actions
538 lines (507 loc) · 39.8 KB
/
AsyncClientsClient.java
File metadata and controls
538 lines (507 loc) · 39.8 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.auth0.client.mgmt;
import com.auth0.client.mgmt.clients.AsyncConnectionsClient;
import com.auth0.client.mgmt.clients.AsyncCredentialsClient;
import com.auth0.client.mgmt.core.ClientOptions;
import com.auth0.client.mgmt.core.RequestOptions;
import com.auth0.client.mgmt.core.Suppliers;
import com.auth0.client.mgmt.core.SyncPagingIterable;
import com.auth0.client.mgmt.types.Client;
import com.auth0.client.mgmt.types.CreateClientRequestContent;
import com.auth0.client.mgmt.types.CreateClientResponseContent;
import com.auth0.client.mgmt.types.GetClientRequestParameters;
import com.auth0.client.mgmt.types.GetClientResponseContent;
import com.auth0.client.mgmt.types.ListClientsRequestParameters;
import com.auth0.client.mgmt.types.PreviewCimdMetadataRequestContent;
import com.auth0.client.mgmt.types.PreviewCimdMetadataResponseContent;
import com.auth0.client.mgmt.types.RegisterCimdClientRequestContent;
import com.auth0.client.mgmt.types.RegisterCimdClientResponseContent;
import com.auth0.client.mgmt.types.RotateClientSecretResponseContent;
import com.auth0.client.mgmt.types.UpdateClientRequestContent;
import com.auth0.client.mgmt.types.UpdateClientResponseContent;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;
public class AsyncClientsClient {
protected final ClientOptions clientOptions;
private final AsyncRawClientsClient rawClient;
protected final Supplier<AsyncCredentialsClient> credentialsClient;
protected final Supplier<AsyncConnectionsClient> connectionsClient;
public AsyncClientsClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.rawClient = new AsyncRawClientsClient(clientOptions);
this.credentialsClient = Suppliers.memoize(() -> new AsyncCredentialsClient(clientOptions));
this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions));
}
/**
* Get responses with HTTP metadata like headers
*/
public AsyncRawClientsClient withRawResponse() {
return this.rawClient;
}
/**
* Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following can be retrieved with any scope:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<SyncPagingIterable<Client>> list() {
return this.rawClient.list().thenApply(response -> response.body());
}
/**
* Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following can be retrieved with any scope:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<SyncPagingIterable<Client>> list(RequestOptions requestOptions) {
return this.rawClient.list(requestOptions).thenApply(response -> response.body());
}
/**
* Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following can be retrieved with any scope:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<SyncPagingIterable<Client>> list(ListClientsRequestParameters request) {
return this.rawClient.list(request).thenApply(response -> response.body());
}
/**
* Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following can be retrieved with any scope:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<SyncPagingIterable<Client>> list(
ListClientsRequestParameters request, RequestOptions requestOptions) {
return this.rawClient.list(request, requestOptions).thenApply(response -> response.body());
}
/**
* Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a>
* <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>.
* <p>Notes:</p>
* <ul>
* <li>We recommend leaving the <code>client_secret</code> parameter unspecified to allow the generation of a safe secret.</li>
* <li>The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use
* <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code>
* to configure the client with client secret (basic or post) or with no authentication method (none).</li>
* <li>When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials.
* These credentials will be automatically enabled for Private Key JWT authentication on the client.</li>
* <li>To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.</li>
* <li>To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.</li>
* </ul>
* <p><div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div></p>
*/
public CompletableFuture<CreateClientResponseContent> create(CreateClientRequestContent request) {
return this.rawClient.create(request).thenApply(response -> response.body());
}
/**
* Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a>
* <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>.
* <p>Notes:</p>
* <ul>
* <li>We recommend leaving the <code>client_secret</code> parameter unspecified to allow the generation of a safe secret.</li>
* <li>The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use
* <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code>
* to configure the client with client secret (basic or post) or with no authentication method (none).</li>
* <li>When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials.
* These credentials will be automatically enabled for Private Key JWT authentication on the client.</li>
* <li>To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.</li>
* <li>To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.</li>
* </ul>
* <p><div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div></p>
*/
public CompletableFuture<CreateClientResponseContent> create(
CreateClientRequestContent request, RequestOptions requestOptions) {
return this.rawClient.create(request, requestOptions).thenApply(response -> response.body());
}
/**
* Fetches and validates a Client ID Metadata Document without creating a client.
* Returns the raw metadata and how it would be mapped to Auth0 client fields.
* This endpoint is useful for testing metadata URIs before creating CIMD clients.
*/
public CompletableFuture<PreviewCimdMetadataResponseContent> previewCimdMetadata(
PreviewCimdMetadataRequestContent request) {
return this.rawClient.previewCimdMetadata(request).thenApply(response -> response.body());
}
/**
* Fetches and validates a Client ID Metadata Document without creating a client.
* Returns the raw metadata and how it would be mapped to Auth0 client fields.
* This endpoint is useful for testing metadata URIs before creating CIMD clients.
*/
public CompletableFuture<PreviewCimdMetadataResponseContent> previewCimdMetadata(
PreviewCimdMetadataRequestContent request, RequestOptions requestOptions) {
return this.rawClient.previewCimdMetadata(request, requestOptions).thenApply(response -> response.body());
}
/**
* Idempotent registration for Client ID Metadata Document (CIMD) clients.
* Uses external_client_id as the unique identifier for upsert operations.
* <strong>Create:</strong> Returns 201 when a new client is created (requires \
*/
public CompletableFuture<RegisterCimdClientResponseContent> registerCimdClient(
RegisterCimdClientRequestContent request) {
return this.rawClient.registerCimdClient(request).thenApply(response -> response.body());
}
/**
* Idempotent registration for Client ID Metadata Document (CIMD) clients.
* Uses external_client_id as the unique identifier for upsert operations.
* <strong>Create:</strong> Returns 201 when a new client is created (requires \
*/
public CompletableFuture<RegisterCimdClientResponseContent> registerCimdClient(
RegisterCimdClientRequestContent request, RequestOptions requestOptions) {
return this.rawClient.registerCimdClient(request, requestOptions).thenApply(response -> response.body());
}
/**
* Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following properties can be retrieved with any of the scopes:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scopes:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<GetClientResponseContent> get(String id) {
return this.rawClient.get(id).thenApply(response -> response.body());
}
/**
* Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following properties can be retrieved with any of the scopes:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scopes:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<GetClientResponseContent> get(String id, RequestOptions requestOptions) {
return this.rawClient.get(id, requestOptions).thenApply(response -> response.body());
}
/**
* Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following properties can be retrieved with any of the scopes:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scopes:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<GetClientResponseContent> get(String id, GetClientRequestParameters request) {
return this.rawClient.get(id, request).thenApply(response -> response.body());
}
/**
* Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p><ul>
* <li>
* The following properties can be retrieved with any of the scopes:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scopes:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
* <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>,
* <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>,
* <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>,
* <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>,
* <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>,
* <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>,
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul></p>
*/
public CompletableFuture<GetClientResponseContent> get(
String id, GetClientRequestParameters request, RequestOptions requestOptions) {
return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body());
}
/**
* Delete a client and related configuration (rules, connections, etc).
*/
public CompletableFuture<Void> delete(String id) {
return this.rawClient.delete(id).thenApply(response -> response.body());
}
/**
* Delete a client and related configuration (rules, connections, etc).
*/
public CompletableFuture<Void> delete(String id, RequestOptions requestOptions) {
return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body());
}
/**
* Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p>Notes:</p>
* <ul>
* <li>The <code>client_secret</code> and <code>signing_key</code> attributes can only be updated with the <code>update:client_keys</code> scope.</li>
* <li>The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).</li>
* <li>When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.</li>
* <li>To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.</li>
* <li>To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.</li>
* <li>To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.</li>
* </ul>
*/
public CompletableFuture<UpdateClientResponseContent> update(String id) {
return this.rawClient.update(id).thenApply(response -> response.body());
}
/**
* Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p>Notes:</p>
* <ul>
* <li>The <code>client_secret</code> and <code>signing_key</code> attributes can only be updated with the <code>update:client_keys</code> scope.</li>
* <li>The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).</li>
* <li>When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.</li>
* <li>To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.</li>
* <li>To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.</li>
* <li>To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.</li>
* </ul>
*/
public CompletableFuture<UpdateClientResponseContent> update(String id, RequestOptions requestOptions) {
return this.rawClient.update(id, requestOptions).thenApply(response -> response.body());
}
/**
* Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p>Notes:</p>
* <ul>
* <li>The <code>client_secret</code> and <code>signing_key</code> attributes can only be updated with the <code>update:client_keys</code> scope.</li>
* <li>The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).</li>
* <li>When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.</li>
* <li>To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.</li>
* <li>To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.</li>
* <li>To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.</li>
* </ul>
*/
public CompletableFuture<UpdateClientResponseContent> update(String id, UpdateClientRequestContent request) {
return this.rawClient.update(id, request).thenApply(response -> response.body());
}
/**
* Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <p>Notes:</p>
* <ul>
* <li>The <code>client_secret</code> and <code>signing_key</code> attributes can only be updated with the <code>update:client_keys</code> scope.</li>
* <li>The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).</li>
* <li>When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.</li>
* <li>To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.</li>
* <li>To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.</li>
* <li>To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.</li>
* </ul>
*/
public CompletableFuture<UpdateClientResponseContent> update(
String id, UpdateClientRequestContent request, RequestOptions requestOptions) {
return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body());
}
/**
* Rotate a client secret.
* <p>This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.</p>
* <p>For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.</p>
*/
public CompletableFuture<RotateClientSecretResponseContent> rotateSecret(String id) {
return this.rawClient.rotateSecret(id).thenApply(response -> response.body());
}
/**
* Rotate a client secret.
* <p>This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.</p>
* <p>For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.</p>
*/
public CompletableFuture<RotateClientSecretResponseContent> rotateSecret(String id, RequestOptions requestOptions) {
return this.rawClient.rotateSecret(id, requestOptions).thenApply(response -> response.body());
}
public AsyncCredentialsClient credentials() {
return this.credentialsClient.get();
}
public AsyncConnectionsClient connections() {
return this.connectionsClient.get();
}
}