diff --git a/reference.md b/reference.md index ee872ab16..18e66e02b 100644 --- a/reference.md +++ b/reference.md @@ -1774,6 +1774,14 @@ client.clients().create(
+**tokenVaultPrivilegedAccess:** `Optional` + +
+
+ +
+
+ **complianceLevel:** `Optional`
@@ -2495,7 +2503,7 @@ client.clients().update(
-**nativeSocialLogin:** `Optional` +**nativeSocialLogin:** `Optional`
@@ -2503,7 +2511,7 @@ client.clients().update(
-**fedcmLogin:** `Optional` +**fedcmLogin:** `Optional`
@@ -2583,6 +2591,14 @@ client.clients().update(
+**tokenVaultPrivilegedAccess:** `Optional` + +
+
+ +
+
+ **complianceLevel:** `Optional`
@@ -3466,6 +3482,14 @@ client.connections().create( **connectedAccounts:** `Optional` + +
+ +
+
+ +**crossAppAccessRequestingApp:** `Optional` +
@@ -3736,6 +3760,14 @@ client.connections().update( **connectedAccounts:** `Optional` + +
+ +
+
+ +**crossAppAccessRequestingApp:** `Optional` +
@@ -4883,7 +4915,7 @@ client.emailTemplates().create(
-Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, and `async_approval`. The names `change_password`, and `password_reset` are also supported for legacy scenarios. +Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, and `async_approval`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
@@ -4913,7 +4945,7 @@ client.emailTemplates().get(EmailTemplateNameEnum.VERIFY_EMAIL);
-**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). +**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
@@ -4973,7 +5005,7 @@ client.emailTemplates().set(
-**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). +**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
@@ -5104,7 +5136,7 @@ client.emailTemplates().update(
-**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). +**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
@@ -16587,6 +16619,105 @@ client.attackProtection().captcha().update( + + + + +## AttackProtection PhoneProviderProtection +
client.attackProtection.phoneProviderProtection.get() -> GetPhoneProviderProtectionResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the phone provider protection configuration for a tenant. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.attackProtection().phoneProviderProtection().get(); +``` +
+
+
+
+ + +
+
+
+ +
client.attackProtection.phoneProviderProtection.patch(request) -> PatchPhoneProviderProtectionResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the phone provider protection configuration for a tenant. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.attackProtection().phoneProviderProtection().patch( + PatchPhoneProviderProtectionRequestContent + .builder() + .type(PhoneProviderProtectionBackoffStrategyEnum.EXPONENTIAL) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**type:** `PhoneProviderProtectionBackoffStrategyEnum` + +
+
+
+
+ +
@@ -31576,7 +31707,7 @@ client.users().identities().link(
-**userId:** `Optional` +**userId:** `Optional` — user_id of the secondary user account being linked.
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncEmailTemplatesClient.java index 774b71fbf..70cdf1301 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncEmailTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncEmailTemplatesClient.java @@ -48,14 +48,14 @@ public CompletableFuture create( } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public CompletableFuture get(EmailTemplateNameEnum templateName) { return this.rawClient.get(templateName).thenApply(response -> response.body()); } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public CompletableFuture get( EmailTemplateNameEnum templateName, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java index 9f004ef46..fe59433fc 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java @@ -403,6 +403,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 409: future.completeExceptionally(new ConflictError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java index ec7b9bb8d..65ea9926a 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java @@ -147,7 +147,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public CompletableFuture> get( EmailTemplateNameEnum templateName) { @@ -155,7 +155,7 @@ public CompletableFutureverify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public CompletableFuture> get( EmailTemplateNameEnum templateName, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java index 6b677c881..4a0086140 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java @@ -396,6 +396,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -483,6 +488,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java index 4641f3e70..89f7363a1 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java @@ -705,6 +705,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java index 0bf8b5773..e1237703b 100644 --- a/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java @@ -47,14 +47,14 @@ public CreateEmailTemplateResponseContent create( } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public GetEmailTemplateResponseContent get(EmailTemplateNameEnum templateName) { return this.rawClient.get(templateName).body(); } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public GetEmailTemplateResponseContent get(EmailTemplateNameEnum templateName, RequestOptions requestOptions) { return this.rawClient.get(templateName, requestOptions).body(); diff --git a/src/main/java/com/auth0/client/mgmt/RawClientsClient.java b/src/main/java/com/auth0/client/mgmt/RawClientsClient.java index 454a7ee61..57166ae35 100644 --- a/src/main/java/com/auth0/client/mgmt/RawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawClientsClient.java @@ -356,6 +356,9 @@ public ManagementApiHttpResponse create( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 409: throw new ConflictError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java index 0d71ba5ab..285179573 100644 --- a/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java @@ -119,14 +119,14 @@ public ManagementApiHttpResponse create( } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public ManagementApiHttpResponse get(EmailTemplateNameEnum templateName) { return get(templateName, null); } /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. + * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, auth_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. */ public ManagementApiHttpResponse get( EmailTemplateNameEnum templateName, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java index 004ccf87d..89a83f9dc 100644 --- a/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java @@ -326,6 +326,9 @@ public ManagementApiHttpResponse getByName case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -390,6 +393,9 @@ public ManagementApiHttpResponse get(String id, case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java index b1581077d..5a9848c8c 100644 --- a/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java @@ -550,6 +550,9 @@ public ManagementApiHttpResponse upda case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java index cbe0ff373..4c91e7d0f 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java @@ -18,6 +18,8 @@ public class AsyncAttackProtectionClient { protected final Supplier captchaClient; + protected final Supplier phoneProviderProtectionClient; + protected final Supplier suspiciousIpThrottlingClient; public AsyncAttackProtectionClient(ClientOptions clientOptions) { @@ -27,6 +29,8 @@ public AsyncAttackProtectionClient(ClientOptions clientOptions) { Suppliers.memoize(() -> new AsyncBreachedPasswordDetectionClient(clientOptions)); this.bruteForceProtectionClient = Suppliers.memoize(() -> new AsyncBruteForceProtectionClient(clientOptions)); this.captchaClient = Suppliers.memoize(() -> new AsyncCaptchaClient(clientOptions)); + this.phoneProviderProtectionClient = + Suppliers.memoize(() -> new AsyncPhoneProviderProtectionClient(clientOptions)); this.suspiciousIpThrottlingClient = Suppliers.memoize(() -> new AsyncSuspiciousIpThrottlingClient(clientOptions)); } @@ -47,6 +51,10 @@ public AsyncCaptchaClient captcha() { return this.captchaClient.get(); } + public AsyncPhoneProviderProtectionClient phoneProviderProtection() { + return this.phoneProviderProtectionClient.get(); + } + public AsyncSuspiciousIpThrottlingClient suspiciousIpThrottling() { return this.suspiciousIpThrottlingClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncPhoneProviderProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncPhoneProviderProtectionClient.java new file mode 100644 index 000000000..4fc539f7a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncPhoneProviderProtectionClient.java @@ -0,0 +1,59 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.attackprotection; + +import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent; +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.types.GetPhoneProviderProtectionResponseContent; +import com.auth0.client.mgmt.types.PatchPhoneProviderProtectionResponseContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncPhoneProviderProtectionClient { + protected final ClientOptions clientOptions; + + private final AsyncRawPhoneProviderProtectionClient rawClient; + + public AsyncPhoneProviderProtectionClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawPhoneProviderProtectionClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawPhoneProviderProtectionClient withRawResponse() { + return this.rawClient; + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public CompletableFuture get() { + return this.rawClient.get().thenApply(response -> response.body()); + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public CompletableFuture get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).thenApply(response -> response.body()); + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public CompletableFuture patch( + PatchPhoneProviderProtectionRequestContent request) { + return this.rawClient.patch(request).thenApply(response -> response.body()); + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public CompletableFuture patch( + PatchPhoneProviderProtectionRequestContent request, RequestOptions requestOptions) { + return this.rawClient.patch(request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java new file mode 100644 index 000000000..97d182178 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.attackprotection; + +import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent; +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.GetPhoneProviderProtectionResponseContent; +import com.auth0.client.mgmt.types.PatchPhoneProviderProtectionResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawPhoneProviderProtectionClient { + protected final ClientOptions clientOptions; + + public AsyncRawPhoneProviderProtectionClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public CompletableFuture> get() { + return get(null); + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public CompletableFuture> get( + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("attack-protection/phone-provider-protection"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, GetPhoneProviderProtectionResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public CompletableFuture> patch( + PatchPhoneProviderProtectionRequestContent request) { + return patch(request, null); + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public CompletableFuture> patch( + PatchPhoneProviderProtectionRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("attack-protection/phone-provider-protection"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, PatchPhoneProviderProtectionResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java index d791fe54c..becace7a5 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java @@ -18,6 +18,8 @@ public class AttackProtectionClient { protected final Supplier captchaClient; + protected final Supplier phoneProviderProtectionClient; + protected final Supplier suspiciousIpThrottlingClient; public AttackProtectionClient(ClientOptions clientOptions) { @@ -27,6 +29,7 @@ public AttackProtectionClient(ClientOptions clientOptions) { Suppliers.memoize(() -> new BreachedPasswordDetectionClient(clientOptions)); this.bruteForceProtectionClient = Suppliers.memoize(() -> new BruteForceProtectionClient(clientOptions)); this.captchaClient = Suppliers.memoize(() -> new CaptchaClient(clientOptions)); + this.phoneProviderProtectionClient = Suppliers.memoize(() -> new PhoneProviderProtectionClient(clientOptions)); this.suspiciousIpThrottlingClient = Suppliers.memoize(() -> new SuspiciousIpThrottlingClient(clientOptions)); } @@ -46,6 +49,10 @@ public CaptchaClient captcha() { return this.captchaClient.get(); } + public PhoneProviderProtectionClient phoneProviderProtection() { + return this.phoneProviderProtectionClient.get(); + } + public SuspiciousIpThrottlingClient suspiciousIpThrottling() { return this.suspiciousIpThrottlingClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/PhoneProviderProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/PhoneProviderProtectionClient.java new file mode 100644 index 000000000..2b67f02ca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/PhoneProviderProtectionClient.java @@ -0,0 +1,57 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.attackprotection; + +import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent; +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.types.GetPhoneProviderProtectionResponseContent; +import com.auth0.client.mgmt.types.PatchPhoneProviderProtectionResponseContent; + +public class PhoneProviderProtectionClient { + protected final ClientOptions clientOptions; + + private final RawPhoneProviderProtectionClient rawClient; + + public PhoneProviderProtectionClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawPhoneProviderProtectionClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawPhoneProviderProtectionClient withRawResponse() { + return this.rawClient; + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public GetPhoneProviderProtectionResponseContent get() { + return this.rawClient.get().body(); + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public GetPhoneProviderProtectionResponseContent get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).body(); + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public PatchPhoneProviderProtectionResponseContent patch(PatchPhoneProviderProtectionRequestContent request) { + return this.rawClient.patch(request).body(); + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public PatchPhoneProviderProtectionResponseContent patch( + PatchPhoneProviderProtectionRequestContent request, RequestOptions requestOptions) { + return this.rawClient.patch(request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/RawPhoneProviderProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawPhoneProviderProtectionClient.java new file mode 100644 index 000000000..16f5329dd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/RawPhoneProviderProtectionClient.java @@ -0,0 +1,171 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.attackprotection; + +import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent; +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.GetPhoneProviderProtectionResponseContent; +import com.auth0.client.mgmt.types.PatchPhoneProviderProtectionResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawPhoneProviderProtectionClient { + protected final ClientOptions clientOptions; + + public RawPhoneProviderProtectionClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public ManagementApiHttpResponse get() { + return get(null); + } + + /** + * Get the phone provider protection configuration for a tenant. + */ + public ManagementApiHttpResponse get(RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("attack-protection/phone-provider-protection"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, GetPhoneProviderProtectionResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public ManagementApiHttpResponse patch( + PatchPhoneProviderProtectionRequestContent request) { + return patch(request, null); + } + + /** + * Update the phone provider protection configuration for a tenant. + */ + public ManagementApiHttpResponse patch( + PatchPhoneProviderProtectionRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("attack-protection/phone-provider-protection"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, PatchPhoneProviderProtectionResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/types/PatchPhoneProviderProtectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/attackprotection/types/PatchPhoneProviderProtectionRequestContent.java new file mode 100644 index 000000000..0fefa84ba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/types/PatchPhoneProviderProtectionRequestContent.java @@ -0,0 +1,121 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.attackprotection.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.PhoneProviderProtectionBackoffStrategyEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PatchPhoneProviderProtectionRequestContent.Builder.class) +public final class PatchPhoneProviderProtectionRequestContent { + private final PhoneProviderProtectionBackoffStrategyEnum type; + + private final Map additionalProperties; + + private PatchPhoneProviderProtectionRequestContent( + PhoneProviderProtectionBackoffStrategyEnum type, Map additionalProperties) { + this.type = type; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public PhoneProviderProtectionBackoffStrategyEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchPhoneProviderProtectionRequestContent + && equalTo((PatchPhoneProviderProtectionRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PatchPhoneProviderProtectionRequestContent other) { + return type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TypeStage builder() { + return new Builder(); + } + + public interface TypeStage { + _FinalStage type(@NotNull PhoneProviderProtectionBackoffStrategyEnum type); + + Builder from(PatchPhoneProviderProtectionRequestContent other); + } + + public interface _FinalStage { + PatchPhoneProviderProtectionRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TypeStage, _FinalStage { + private PhoneProviderProtectionBackoffStrategyEnum type; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PatchPhoneProviderProtectionRequestContent other) { + type(other.getType()); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull PhoneProviderProtectionBackoffStrategyEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + public PatchPhoneProviderProtectionRequestContent build() { + return new PatchPhoneProviderProtectionRequestContent(type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java index cd7118145..3ff7dab25 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java @@ -269,6 +269,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java index a4c618408..2731f176f 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java @@ -210,6 +210,9 @@ public ManagementApiHttpResponse get(String kid, case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java index c34866c57..6eeb05748 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java @@ -243,6 +243,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 409: future.completeExceptionally(new ConflictError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java index 1c478c43b..8fb4ad221 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.organizations.types.AddOrganizationConnectionRequestContent; @@ -153,6 +154,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -253,6 +259,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -339,6 +350,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -427,6 +443,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -552,6 +573,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java index 28eb518b5..496cc19af 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.organizations.types.CreateOrganizationMemberRequestContent; @@ -209,6 +210,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java index c1225cafa..8a5cd901b 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java @@ -195,6 +195,9 @@ public ManagementApiHttpResponse case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 409: throw new ConflictError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java index c3c273679..4167a7efe 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.organizations.types.AddOrganizationConnectionRequestContent; @@ -129,6 +130,9 @@ public ManagementApiHttpResponse> lis case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -207,6 +211,9 @@ public ManagementApiHttpResponse add( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -272,6 +279,9 @@ public ManagementApiHttpResponse get( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -338,6 +348,9 @@ public ManagementApiHttpResponse delete(String id, String connectionId, Re case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -441,6 +454,9 @@ public ManagementApiHttpResponse up case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java index 7fb4ac45d..743f0a046 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.organizations.types.CreateOrganizationMemberRequestContent; @@ -185,6 +186,9 @@ public ManagementApiHttpResponse> list( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java index 85c1b7430..6ae562203 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java @@ -15,6 +15,7 @@ import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.organizations.members.types.AssignOrganizationMemberRolesRequestContent; @@ -165,6 +166,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java index 70d50296f..46f0d4223 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java @@ -15,6 +15,7 @@ import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.organizations.members.types.AssignOrganizationMemberRolesRequestContent; @@ -142,6 +143,9 @@ public ManagementApiHttpResponse> list( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java index 685f92da5..b867a4268 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java @@ -249,6 +249,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java index ec8099904..ce99d607a 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java @@ -200,6 +200,9 @@ public ManagementApiHttpResponse add( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java index 8989c71c0..a0d893d51 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -127,6 +128,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java index fdfb2fd17..5711d6c0b 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -111,6 +112,9 @@ public ManagementApiHttpResponse initiateLoginUri; + private final Optional nativeSocialLogin; + + private final Optional fedcmLogin; + private final OptionalNullable refreshToken; private final OptionalNullable defaultOrganization; @@ -114,6 +118,8 @@ public final class Client { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; @@ -183,6 +189,8 @@ private Client( Optional> clientMetadata, Optional mobile, Optional initiateLoginUri, + Optional nativeSocialLogin, + Optional fedcmLogin, OptionalNullable refreshToken, OptionalNullable defaultOrganization, Optional organizationUsage, @@ -192,6 +200,7 @@ private Client( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, Optional skipNonVerifiableCallbackUriConfirmationPrompt, Optional tokenExchange, @@ -244,6 +253,8 @@ private Client( this.clientMetadata = clientMetadata; this.mobile = mobile; this.initiateLoginUri = initiateLoginUri; + this.nativeSocialLogin = nativeSocialLogin; + this.fedcmLogin = fedcmLogin; this.refreshToken = refreshToken; this.defaultOrganization = defaultOrganization; this.organizationUsage = organizationUsage; @@ -253,6 +264,7 @@ private Client( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -541,6 +553,16 @@ public Optional getInitiateLoginUri() { return initiateLoginUri; } + @JsonProperty("native_social_login") + public Optional getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonProperty("fedcm_login") + public Optional getFedcmLogin() { + return fedcmLogin; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("refresh_token") public OptionalNullable getRefreshToken() { @@ -607,6 +629,11 @@ public Optional getSignedRequestObjec return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -803,6 +830,8 @@ private boolean equalTo(Client other) { && clientMetadata.equals(other.clientMetadata) && mobile.equals(other.mobile) && initiateLoginUri.equals(other.initiateLoginUri) + && nativeSocialLogin.equals(other.nativeSocialLogin) + && fedcmLogin.equals(other.fedcmLogin) && refreshToken.equals(other.refreshToken) && defaultOrganization.equals(other.defaultOrganization) && organizationUsage.equals(other.organizationUsage) @@ -812,6 +841,7 @@ private boolean equalTo(Client other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -869,6 +899,8 @@ public int hashCode() { this.clientMetadata, this.mobile, this.initiateLoginUri, + this.nativeSocialLogin, + this.fedcmLogin, this.refreshToken, this.defaultOrganization, this.organizationUsage, @@ -878,6 +910,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -978,6 +1011,10 @@ public static final class Builder { private Optional initiateLoginUri = Optional.empty(); + private Optional nativeSocialLogin = Optional.empty(); + + private Optional fedcmLogin = Optional.empty(); + private OptionalNullable refreshToken = OptionalNullable.absent(); private OptionalNullable defaultOrganization = OptionalNullable.absent(); @@ -996,6 +1033,9 @@ public static final class Builder { private Optional signedRequestObject = Optional.empty(); + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + private OptionalNullable complianceLevel = OptionalNullable.absent(); private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); @@ -1069,6 +1109,8 @@ public Builder from(Client other) { clientMetadata(other.getClientMetadata()); mobile(other.getMobile()); initiateLoginUri(other.getInitiateLoginUri()); + nativeSocialLogin(other.getNativeSocialLogin()); + fedcmLogin(other.getFedcmLogin()); refreshToken(other.getRefreshToken()); defaultOrganization(other.getDefaultOrganization()); organizationUsage(other.getOrganizationUsage()); @@ -1078,6 +1120,7 @@ public Builder from(Client other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1631,6 +1674,28 @@ public Builder initiateLoginUri(String initiateLoginUri) { return this; } + @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + this.nativeSocialLogin = nativeSocialLogin; + return this; + } + + public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { + this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + return this; + } + + @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) + public Builder fedcmLogin(Optional fedcmLogin) { + this.fedcmLogin = fedcmLogin; + return this; + } + + public Builder fedcmLogin(FedCmLogin fedcmLogin) { + this.fedcmLogin = Optional.ofNullable(fedcmLogin); + return this; + } + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) public Builder refreshToken(@Nullable OptionalNullable refreshToken) { this.refreshToken = refreshToken; @@ -1805,6 +1870,19 @@ public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId sig return this; } + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { this.complianceLevel = complianceLevel; @@ -2073,6 +2151,8 @@ public Client build() { clientMetadata, mobile, initiateLoginUri, + nativeSocialLogin, + fedcmLogin, refreshToken, defaultOrganization, organizationUsage, @@ -2082,6 +2162,7 @@ public Client build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java new file mode 100644 index 000000000..cc7455412 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java @@ -0,0 +1,143 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientTokenVaultPrivilegedAccessWithCredentialId.Builder.class) +public final class ClientTokenVaultPrivilegedAccessWithCredentialId { + private final List credentials; + + private final Optional> ipAllowlist; + + private final Map additionalProperties; + + private ClientTokenVaultPrivilegedAccessWithCredentialId( + List credentials, + Optional> ipAllowlist, + Map additionalProperties) { + this.credentials = credentials; + this.ipAllowlist = ipAllowlist; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("credentials") + public List getCredentials() { + return credentials; + } + + @JsonProperty("ip_allowlist") + public Optional> getIpAllowlist() { + return ipAllowlist; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientTokenVaultPrivilegedAccessWithCredentialId + && equalTo((ClientTokenVaultPrivilegedAccessWithCredentialId) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientTokenVaultPrivilegedAccessWithCredentialId other) { + return credentials.equals(other.credentials) && ipAllowlist.equals(other.ipAllowlist); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.credentials, this.ipAllowlist); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private List credentials = new ArrayList<>(); + + private Optional> ipAllowlist = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientTokenVaultPrivilegedAccessWithCredentialId other) { + credentials(other.getCredentials()); + ipAllowlist(other.getIpAllowlist()); + return this; + } + + @JsonSetter(value = "credentials", nulls = Nulls.SKIP) + public Builder credentials(List credentials) { + this.credentials.clear(); + if (credentials != null) { + this.credentials.addAll(credentials); + } + return this; + } + + public Builder addCredentials(CredentialId credentials) { + this.credentials.add(credentials); + return this; + } + + public Builder addAllCredentials(List credentials) { + if (credentials != null) { + this.credentials.addAll(credentials); + } + return this; + } + + @JsonSetter(value = "ip_allowlist", nulls = Nulls.SKIP) + public Builder ipAllowlist(Optional> ipAllowlist) { + this.ipAllowlist = ipAllowlist; + return this; + } + + public Builder ipAllowlist(List ipAllowlist) { + this.ipAllowlist = Optional.ofNullable(ipAllowlist); + return this; + } + + public ClientTokenVaultPrivilegedAccessWithCredentialId build() { + return new ClientTokenVaultPrivilegedAccessWithCredentialId(credentials, ipAllowlist, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java new file mode 100644 index 000000000..9a2f2f7ad --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java @@ -0,0 +1,143 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientTokenVaultPrivilegedAccessWithPublicKey.Builder.class) +public final class ClientTokenVaultPrivilegedAccessWithPublicKey { + private final List credentials; + + private final Optional> ipAllowlist; + + private final Map additionalProperties; + + private ClientTokenVaultPrivilegedAccessWithPublicKey( + List credentials, + Optional> ipAllowlist, + Map additionalProperties) { + this.credentials = credentials; + this.ipAllowlist = ipAllowlist; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("credentials") + public List getCredentials() { + return credentials; + } + + @JsonProperty("ip_allowlist") + public Optional> getIpAllowlist() { + return ipAllowlist; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientTokenVaultPrivilegedAccessWithPublicKey + && equalTo((ClientTokenVaultPrivilegedAccessWithPublicKey) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientTokenVaultPrivilegedAccessWithPublicKey other) { + return credentials.equals(other.credentials) && ipAllowlist.equals(other.ipAllowlist); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.credentials, this.ipAllowlist); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private List credentials = new ArrayList<>(); + + private Optional> ipAllowlist = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientTokenVaultPrivilegedAccessWithPublicKey other) { + credentials(other.getCredentials()); + ipAllowlist(other.getIpAllowlist()); + return this; + } + + @JsonSetter(value = "credentials", nulls = Nulls.SKIP) + public Builder credentials(List credentials) { + this.credentials.clear(); + if (credentials != null) { + this.credentials.addAll(credentials); + } + return this; + } + + public Builder addCredentials(PublicKeyCredential credentials) { + this.credentials.add(credentials); + return this; + } + + public Builder addAllCredentials(List credentials) { + if (credentials != null) { + this.credentials.addAll(credentials); + } + return this; + } + + @JsonSetter(value = "ip_allowlist", nulls = Nulls.SKIP) + public Builder ipAllowlist(Optional> ipAllowlist) { + this.ipAllowlist = ipAllowlist; + return this; + } + + public Builder ipAllowlist(List ipAllowlist) { + this.ipAllowlist = Optional.ofNullable(ipAllowlist); + return this; + } + + public ClientTokenVaultPrivilegedAccessWithPublicKey build() { + return new ClientTokenVaultPrivilegedAccessWithPublicKey(credentials, ipAllowlist, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java index b192408e8..7879f24a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java @@ -44,6 +44,8 @@ public final class ConnectionForList { private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Map additionalProperties; private ConnectionForList( @@ -58,6 +60,7 @@ private ConnectionForList( Optional>> metadata, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -70,6 +73,7 @@ private ConnectionForList( this.metadata = metadata; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.additionalProperties = additionalProperties; } @@ -149,6 +153,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -171,7 +180,8 @@ private boolean equalTo(ConnectionForList other) { && showAsButton.equals(other.showAsButton) && metadata.equals(other.metadata) && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); + && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); } @java.lang.Override @@ -187,7 +197,8 @@ public int hashCode() { this.showAsButton, this.metadata, this.authentication, - this.connectedAccounts); + this.connectedAccounts, + this.crossAppAccessRequestingApp); } @java.lang.Override @@ -223,6 +234,8 @@ public static final class Builder { private Optional connectedAccounts = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -240,6 +253,7 @@ public Builder from(ConnectionForList other) { metadata(other.getMetadata()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); return this; } @@ -385,6 +399,17 @@ public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAcc return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + public ConnectionForList build() { return new ConnectionForList( name, @@ -398,6 +423,7 @@ public ConnectionForList build() { metadata, authentication, connectedAccounts, + crossAppAccessRequestingApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java index b665ced4e..040dc79d6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java @@ -43,6 +43,8 @@ public final class ConnectionResponseContentOidc implements IConnectionResponseC private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Optional options; private final Optional showAsButton; @@ -60,6 +62,7 @@ private ConnectionResponseContentOidc( ConnectionResponseContentOidcStrategy strategy, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -73,6 +76,7 @@ private ConnectionResponseContentOidc( this.strategy = strategy; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -138,6 +142,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -170,6 +179,7 @@ private boolean equalTo(ConnectionResponseContentOidc other) { && strategy.equals(other.strategy) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -187,6 +197,7 @@ public int hashCode() { this.strategy, this.authentication, this.connectedAccounts, + this.crossAppAccessRequestingApp, this.options, this.showAsButton); } @@ -252,6 +263,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts); + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsOidc options); @@ -273,6 +288,8 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional options = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -304,6 +321,7 @@ public Builder from(ConnectionResponseContentOidc other) { strategy(other.getStrategy()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -356,6 +374,20 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); @@ -467,6 +499,7 @@ public ConnectionResponseContentOidc build() { strategy, authentication, connectedAccounts, + crossAppAccessRequestingApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java index 69e173ed1..950c53c51 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java @@ -44,6 +44,8 @@ public final class ConnectionResponseContentOkta private final ConnectionResponseContentOktaStrategy strategy; + private final Optional crossAppAccessRequestingApp; + private final Optional options; private final Optional showAsButton; @@ -61,6 +63,7 @@ private ConnectionResponseContentOkta( Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentOktaStrategy strategy, + Optional crossAppAccessRequestingApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -74,6 +77,7 @@ private ConnectionResponseContentOkta( this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -141,6 +145,11 @@ public ConnectionResponseContentOktaStrategy getStrategy() { return strategy; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -173,6 +182,7 @@ private boolean equalTo(ConnectionResponseContentOkta other) { && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -190,6 +200,7 @@ public int hashCode() { this.isDomainConnection, this.metadata, this.strategy, + this.crossAppAccessRequestingApp, this.options, this.showAsButton); } @@ -255,6 +266,10 @@ public interface _FinalStage { _FinalStage metadata(Map> metadata); + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsOkta options); @@ -276,6 +291,8 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional options = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional>> metadata = Optional.empty(); private Optional isDomainConnection = Optional.empty(); @@ -307,6 +324,7 @@ public Builder from(ConnectionResponseContentOkta other) { isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -359,6 +377,20 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage metadata(Map> metadata) { this.metadata = Optional.ofNullable(metadata); @@ -470,6 +502,7 @@ public ConnectionResponseContentOkta build() { isDomainConnection, metadata, strategy, + crossAppAccessRequestingApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java index 57338d3e6..196dbebd5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java @@ -111,6 +111,8 @@ public final class CreateClientRequestContent { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; @@ -179,6 +181,7 @@ private CreateClientRequestContent( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, Optional skipNonVerifiableCallbackUriConfirmationPrompt, Optional tokenExchange, @@ -234,6 +237,7 @@ private CreateClientRequestContent( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -557,6 +561,11 @@ public Optional getSignedRequestObject() return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -722,6 +731,7 @@ private boolean equalTo(CreateClientRequestContent other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -782,6 +792,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -1083,6 +1094,12 @@ _FinalStage organizationDiscoveryMethods( _FinalStage signedRequestObject(ClientSignedRequestObjectWithPublicKey signedRequestObject); + _FinalStage tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess); + + _FinalStage tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithPublicKey tokenVaultPrivilegedAccess); + _FinalStage complianceLevel(@Nullable OptionalNullable complianceLevel); _FinalStage complianceLevel(ClientComplianceLevelEnum complianceLevel); @@ -1179,6 +1196,8 @@ public static final class Builder implements NameStage, _FinalStage { private OptionalNullable complianceLevel = OptionalNullable.absent(); + private Optional tokenVaultPrivilegedAccess = Optional.empty(); + private Optional signedRequestObject = Optional.empty(); private Optional requireProofOfPossession = Optional.empty(); @@ -1313,6 +1332,7 @@ public Builder from(CreateClientRequestContent other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1567,6 +1587,21 @@ public _FinalStage complianceLevel(@Nullable OptionalNullable tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + @java.lang.Override public _FinalStage signedRequestObject(ClientSignedRequestObjectWithPublicKey signedRequestObject) { this.signedRequestObject = Optional.ofNullable(signedRequestObject); @@ -2433,6 +2468,7 @@ public CreateClientRequestContent build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java index f2795eb4c..7f909743e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java @@ -96,6 +96,10 @@ public final class CreateClientResponseContent { private final Optional initiateLoginUri; + private final Optional nativeSocialLogin; + + private final Optional fedcmLogin; + private final OptionalNullable refreshToken; private final OptionalNullable defaultOrganization; @@ -114,6 +118,8 @@ public final class CreateClientResponseContent { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; @@ -183,6 +189,8 @@ private CreateClientResponseContent( Optional> clientMetadata, Optional mobile, Optional initiateLoginUri, + Optional nativeSocialLogin, + Optional fedcmLogin, OptionalNullable refreshToken, OptionalNullable defaultOrganization, Optional organizationUsage, @@ -192,6 +200,7 @@ private CreateClientResponseContent( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, Optional skipNonVerifiableCallbackUriConfirmationPrompt, Optional tokenExchange, @@ -244,6 +253,8 @@ private CreateClientResponseContent( this.clientMetadata = clientMetadata; this.mobile = mobile; this.initiateLoginUri = initiateLoginUri; + this.nativeSocialLogin = nativeSocialLogin; + this.fedcmLogin = fedcmLogin; this.refreshToken = refreshToken; this.defaultOrganization = defaultOrganization; this.organizationUsage = organizationUsage; @@ -253,6 +264,7 @@ private CreateClientResponseContent( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -541,6 +553,16 @@ public Optional getInitiateLoginUri() { return initiateLoginUri; } + @JsonProperty("native_social_login") + public Optional getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonProperty("fedcm_login") + public Optional getFedcmLogin() { + return fedcmLogin; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("refresh_token") public OptionalNullable getRefreshToken() { @@ -607,6 +629,11 @@ public Optional getSignedRequestObjec return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -803,6 +830,8 @@ private boolean equalTo(CreateClientResponseContent other) { && clientMetadata.equals(other.clientMetadata) && mobile.equals(other.mobile) && initiateLoginUri.equals(other.initiateLoginUri) + && nativeSocialLogin.equals(other.nativeSocialLogin) + && fedcmLogin.equals(other.fedcmLogin) && refreshToken.equals(other.refreshToken) && defaultOrganization.equals(other.defaultOrganization) && organizationUsage.equals(other.organizationUsage) @@ -812,6 +841,7 @@ private boolean equalTo(CreateClientResponseContent other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -869,6 +899,8 @@ public int hashCode() { this.clientMetadata, this.mobile, this.initiateLoginUri, + this.nativeSocialLogin, + this.fedcmLogin, this.refreshToken, this.defaultOrganization, this.organizationUsage, @@ -878,6 +910,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -978,6 +1011,10 @@ public static final class Builder { private Optional initiateLoginUri = Optional.empty(); + private Optional nativeSocialLogin = Optional.empty(); + + private Optional fedcmLogin = Optional.empty(); + private OptionalNullable refreshToken = OptionalNullable.absent(); private OptionalNullable defaultOrganization = OptionalNullable.absent(); @@ -996,6 +1033,9 @@ public static final class Builder { private Optional signedRequestObject = Optional.empty(); + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + private OptionalNullable complianceLevel = OptionalNullable.absent(); private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); @@ -1069,6 +1109,8 @@ public Builder from(CreateClientResponseContent other) { clientMetadata(other.getClientMetadata()); mobile(other.getMobile()); initiateLoginUri(other.getInitiateLoginUri()); + nativeSocialLogin(other.getNativeSocialLogin()); + fedcmLogin(other.getFedcmLogin()); refreshToken(other.getRefreshToken()); defaultOrganization(other.getDefaultOrganization()); organizationUsage(other.getOrganizationUsage()); @@ -1078,6 +1120,7 @@ public Builder from(CreateClientResponseContent other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1631,6 +1674,28 @@ public Builder initiateLoginUri(String initiateLoginUri) { return this; } + @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + this.nativeSocialLogin = nativeSocialLogin; + return this; + } + + public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { + this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + return this; + } + + @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) + public Builder fedcmLogin(Optional fedcmLogin) { + this.fedcmLogin = fedcmLogin; + return this; + } + + public Builder fedcmLogin(FedCmLogin fedcmLogin) { + this.fedcmLogin = Optional.ofNullable(fedcmLogin); + return this; + } + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) public Builder refreshToken(@Nullable OptionalNullable refreshToken) { this.refreshToken = refreshToken; @@ -1805,6 +1870,19 @@ public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId sig return this; } + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { this.complianceLevel = complianceLevel; @@ -2073,6 +2151,8 @@ public CreateClientResponseContent build() { clientMetadata, mobile, initiateLoginUri, + nativeSocialLogin, + fedcmLogin, refreshToken, defaultOrganization, organizationUsage, @@ -2082,6 +2162,7 @@ public CreateClientResponseContent build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java index 00de20fc5..7957af75b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java @@ -45,6 +45,8 @@ public final class CreateConnectionRequestContent { private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Map additionalProperties; private CreateConnectionRequestContent( @@ -59,6 +61,7 @@ private CreateConnectionRequestContent( Optional>> metadata, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -71,6 +74,7 @@ private CreateConnectionRequestContent( this.metadata = metadata; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.additionalProperties = additionalProperties; } @@ -147,6 +151,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -169,7 +178,8 @@ private boolean equalTo(CreateConnectionRequestContent other) { && realms.equals(other.realms) && metadata.equals(other.metadata) && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); + && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); } @java.lang.Override @@ -185,7 +195,8 @@ public int hashCode() { this.realms, this.metadata, this.authentication, - this.connectedAccounts); + this.connectedAccounts, + this.crossAppAccessRequestingApp); } @java.lang.Override @@ -267,6 +278,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(Optional connectedAccounts); _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -275,6 +290,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private ConnectionIdentityProviderEnum strategy; + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -311,6 +328,7 @@ public Builder from(CreateConnectionRequestContent other) { metadata(other.getMetadata()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); return this; } @@ -333,6 +351,20 @@ public _FinalStage strategy(@NotNull ConnectionIdentityProviderEnum strategy) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); @@ -499,6 +531,7 @@ public CreateConnectionRequestContent build() { metadata, authentication, connectedAccounts, + crossAppAccessRequestingApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java index dab2f821a..f9df64c69 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java @@ -39,6 +39,8 @@ public final class CreateConnectionRequestContentOidc implements ICreateConnecti private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Optional options; private final Optional showAsButton; @@ -54,6 +56,7 @@ private CreateConnectionRequestContentOidc( CreateConnectionRequestContentOidcStrategy strategy, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -65,6 +68,7 @@ private CreateConnectionRequestContentOidc( this.strategy = strategy; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -118,6 +122,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -149,6 +158,7 @@ private boolean equalTo(CreateConnectionRequestContentOidc other) { && strategy.equals(other.strategy) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -164,6 +174,7 @@ public int hashCode() { this.strategy, this.authentication, this.connectedAccounts, + this.crossAppAccessRequestingApp, this.options, this.showAsButton); } @@ -221,6 +232,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts); + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsOidc options); @@ -240,6 +255,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional options = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -267,6 +284,7 @@ public Builder from(CreateConnectionRequestContentOidc other) { strategy(other.getStrategy()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -312,6 +330,20 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); @@ -408,6 +440,7 @@ public CreateConnectionRequestContentOidc build() { strategy, authentication, connectedAccounts, + crossAppAccessRequestingApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java index 0a9724fe8..dba8a63ff 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java @@ -35,6 +35,8 @@ public final class CreateConnectionRequestContentOkta implements ICreateConnecti private final CreateConnectionRequestContentOktaStrategy strategy; + private final Optional crossAppAccessRequestingApp; + private final Optional options; private final Optional showAsButton; @@ -48,6 +50,7 @@ private CreateConnectionRequestContentOkta( Optional isDomainConnection, Optional>> metadata, CreateConnectionRequestContentOktaStrategy strategy, + Optional crossAppAccessRequestingApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -57,6 +60,7 @@ private CreateConnectionRequestContentOkta( this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -100,6 +104,11 @@ public CreateConnectionRequestContentOktaStrategy getStrategy() { return strategy; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -129,6 +138,7 @@ private boolean equalTo(CreateConnectionRequestContentOkta other) { && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -142,6 +152,7 @@ public int hashCode() { this.isDomainConnection, this.metadata, this.strategy, + this.crossAppAccessRequestingApp, this.options, this.showAsButton); } @@ -191,6 +202,10 @@ public interface _FinalStage { _FinalStage metadata(Map> metadata); + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsOkta options); @@ -210,6 +225,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional options = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional>> metadata = Optional.empty(); private Optional isDomainConnection = Optional.empty(); @@ -231,6 +248,7 @@ public Builder from(CreateConnectionRequestContentOkta other) { isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -276,6 +294,20 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage metadata(Map> metadata) { this.metadata = Optional.ofNullable(metadata); @@ -344,6 +376,7 @@ public CreateConnectionRequestContentOkta build() { isDomainConnection, metadata, strategy, + crossAppAccessRequestingApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java index 112fa2eb7..93142c143 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java @@ -46,6 +46,8 @@ public final class CreateConnectionResponseContent { private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Map additionalProperties; private CreateConnectionResponseContent( @@ -61,6 +63,7 @@ private CreateConnectionResponseContent( Optional>> metadata, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -74,6 +77,7 @@ private CreateConnectionResponseContent( this.metadata = metadata; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.additionalProperties = additionalProperties; } @@ -161,6 +165,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -184,7 +193,8 @@ private boolean equalTo(CreateConnectionResponseContent other) { && showAsButton.equals(other.showAsButton) && metadata.equals(other.metadata) && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); + && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); } @java.lang.Override @@ -201,7 +211,8 @@ public int hashCode() { this.showAsButton, this.metadata, this.authentication, - this.connectedAccounts); + this.connectedAccounts, + this.crossAppAccessRequestingApp); } @java.lang.Override @@ -239,6 +250,8 @@ public static final class Builder { private Optional connectedAccounts = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -257,6 +270,7 @@ public Builder from(CreateConnectionResponseContent other) { metadata(other.getMetadata()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); return this; } @@ -416,6 +430,17 @@ public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAcc return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + public CreateConnectionResponseContent build() { return new CreateConnectionResponseContent( name, @@ -430,6 +455,7 @@ public CreateConnectionResponseContent build() { metadata, authentication, connectedAccounts, + crossAppAccessRequestingApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java index 8208679db..c9c369977 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,9 +34,9 @@ public final class CreateUserResponseContent { private final Optional phoneVerified; - private final Optional createdAt; + private final Optional createdAt; - private final Optional updatedAt; + private final Optional updatedAt; private final Optional> identities; @@ -51,13 +52,13 @@ public final class CreateUserResponseContent { private final Optional> multifactor; - private final Optional multifactorLastModified; + private final Optional multifactorLastModified; private final Optional lastIp; - private final Optional lastLogin; + private final Optional lastLogin; - private final Optional lastPasswordReset; + private final Optional lastPasswordReset; private final Optional loginsCount; @@ -76,8 +77,8 @@ private CreateUserResponseContent( Optional username, Optional phoneNumber, Optional phoneVerified, - Optional createdAt, - Optional updatedAt, + Optional createdAt, + Optional updatedAt, Optional> identities, Optional> appMetadata, Optional> userMetadata, @@ -85,10 +86,10 @@ private CreateUserResponseContent( Optional name, Optional nickname, Optional> multifactor, - Optional multifactorLastModified, + Optional multifactorLastModified, Optional lastIp, - Optional lastLogin, - Optional lastPasswordReset, + Optional lastLogin, + Optional lastPasswordReset, Optional loginsCount, Optional blocked, Optional givenName, @@ -168,13 +169,19 @@ public Optional getPhoneVerified() { return phoneVerified; } + /** + * @return Date and time when this user was created. + */ @JsonProperty("created_at") - public Optional getCreatedAt() { + public Optional getCreatedAt() { return createdAt; } + /** + * @return Date and time when this user was last updated/modified. + */ @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public Optional getUpdatedAt() { return updatedAt; } @@ -228,8 +235,11 @@ public Optional> getMultifactor() { return multifactor; } + /** + * @return Last date and time this user's multi-factor authentication providers were updated. + */ @JsonProperty("multifactor_last_modified") - public Optional getMultifactorLastModified() { + public Optional getMultifactorLastModified() { return multifactorLastModified; } @@ -241,13 +251,19 @@ public Optional getLastIp() { return lastIp; } + /** + * @return Last date and time this user logged in. + */ @JsonProperty("last_login") - public Optional getLastLogin() { + public Optional getLastLogin() { return lastLogin; } + /** + * @return Last date and time this user had their password reset. + */ @JsonProperty("last_password_reset") - public Optional getLastPasswordReset() { + public Optional getLastPasswordReset() { return lastPasswordReset; } @@ -371,9 +387,9 @@ public static final class Builder { private Optional phoneVerified = Optional.empty(); - private Optional createdAt = Optional.empty(); + private Optional createdAt = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Optional updatedAt = Optional.empty(); private Optional> identities = Optional.empty(); @@ -389,13 +405,13 @@ public static final class Builder { private Optional> multifactor = Optional.empty(); - private Optional multifactorLastModified = Optional.empty(); + private Optional multifactorLastModified = Optional.empty(); private Optional lastIp = Optional.empty(); - private Optional lastLogin = Optional.empty(); + private Optional lastLogin = Optional.empty(); - private Optional lastPasswordReset = Optional.empty(); + private Optional lastPasswordReset = Optional.empty(); private Optional loginsCount = Optional.empty(); @@ -521,24 +537,30 @@ public Builder phoneVerified(Boolean phoneVerified) { return this; } + /** + *

Date and time when this user was created.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; return this; } - public Builder createdAt(UserDateSchema createdAt) { + public Builder createdAt(OffsetDateTime createdAt) { this.createdAt = Optional.ofNullable(createdAt); return this; } + /** + *

Date and time when this user was last updated/modified.

+ */ @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(Optional updatedAt) { this.updatedAt = updatedAt; return this; } - public Builder updatedAt(UserDateSchema updatedAt) { + public Builder updatedAt(OffsetDateTime updatedAt) { this.updatedAt = Optional.ofNullable(updatedAt); return this; } @@ -635,13 +657,16 @@ public Builder multifactor(List multifactor) { return this; } + /** + *

Last date and time this user's multi-factor authentication providers were updated.

+ */ @JsonSetter(value = "multifactor_last_modified", nulls = Nulls.SKIP) - public Builder multifactorLastModified(Optional multifactorLastModified) { + public Builder multifactorLastModified(Optional multifactorLastModified) { this.multifactorLastModified = multifactorLastModified; return this; } - public Builder multifactorLastModified(UserDateSchema multifactorLastModified) { + public Builder multifactorLastModified(OffsetDateTime multifactorLastModified) { this.multifactorLastModified = Optional.ofNullable(multifactorLastModified); return this; } @@ -660,24 +685,30 @@ public Builder lastIp(String lastIp) { return this; } + /** + *

Last date and time this user logged in.

+ */ @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { + public Builder lastLogin(Optional lastLogin) { this.lastLogin = lastLogin; return this; } - public Builder lastLogin(UserDateSchema lastLogin) { + public Builder lastLogin(OffsetDateTime lastLogin) { this.lastLogin = Optional.ofNullable(lastLogin); return this; } + /** + *

Last date and time this user had their password reset.

+ */ @JsonSetter(value = "last_password_reset", nulls = Nulls.SKIP) - public Builder lastPasswordReset(Optional lastPasswordReset) { + public Builder lastPasswordReset(Optional lastPasswordReset) { this.lastPasswordReset = lastPasswordReset; return this; } - public Builder lastPasswordReset(UserDateSchema lastPasswordReset) { + public Builder lastPasswordReset(OffsetDateTime lastPasswordReset) { this.lastPasswordReset = Optional.ofNullable(lastPasswordReset); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java new file mode 100644 index 000000000..c4f576165 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java @@ -0,0 +1,128 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CrossAppAccessRequestingApp.Builder.class) +public final class CrossAppAccessRequestingApp { + private final boolean active; + + private final Map additionalProperties; + + private CrossAppAccessRequestingApp(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Set to true to enable the connection as a Requesting Application for Cross App Access. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CrossAppAccessRequestingApp && equalTo((CrossAppAccessRequestingApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CrossAppAccessRequestingApp other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

Set to true to enable the connection as a Requesting Application for Cross App Access.

+ */ + _FinalStage active(boolean active); + + Builder from(CrossAppAccessRequestingApp other); + } + + public interface _FinalStage { + CrossAppAccessRequestingApp build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CrossAppAccessRequestingApp other) { + active(other.getActive()); + return this; + } + + /** + *

Set to true to enable the connection as a Requesting Application for Cross App Access.

+ *

Set to true to enable the connection as a Requesting Application for Cross App Access.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public CrossAppAccessRequestingApp build() { + return new CrossAppAccessRequestingApp(active, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java index ad2e2d192..835020771 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java @@ -23,7 +23,7 @@ public final class DeleteUserIdentityResponseContentItem { private final String connection; - private final String userId; + private final UserId userId; private final String provider; @@ -41,7 +41,7 @@ public final class DeleteUserIdentityResponseContentItem { private DeleteUserIdentityResponseContentItem( String connection, - String userId, + UserId userId, String provider, Optional isSocial, Optional accessToken, @@ -72,7 +72,7 @@ public String getConnection() { * @return The unique identifier for the user for the identity. */ @JsonProperty("user_id") - public String getUserId() { + public UserId getUserId() { return userId; } @@ -179,7 +179,7 @@ public interface UserIdStage { /** *

The unique identifier for the user for the identity.

*/ - ProviderStage userId(@NotNull String userId); + ProviderStage userId(@NotNull UserId userId); } public interface ProviderStage { @@ -233,7 +233,7 @@ public interface _FinalStage { public static final class Builder implements ConnectionStage, UserIdStage, ProviderStage, _FinalStage { private String connection; - private String userId; + private UserId userId; private String provider; @@ -284,7 +284,7 @@ public UserIdStage connection(@NotNull String connection) { */ @java.lang.Override @JsonSetter("user_id") - public ProviderStage userId(@NotNull String userId) { + public ProviderStage userId(@NotNull UserId userId) { this.userId = Objects.requireNonNull(userId, "userId must not be null"); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java index dedb45a0d..eca9313cb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java @@ -40,6 +40,9 @@ public final class EmailTemplateNameEnum { public static final EmailTemplateNameEnum MFA_OOB_CODE = new EmailTemplateNameEnum(Value.MFA_OOB_CODE, "mfa_oob_code"); + public static final EmailTemplateNameEnum AUTH_EMAIL_BY_CODE = + new EmailTemplateNameEnum(Value.AUTH_EMAIL_BY_CODE, "auth_email_by_code"); + public static final EmailTemplateNameEnum RESET_EMAIL = new EmailTemplateNameEnum(Value.RESET_EMAIL, "reset_email"); public static final EmailTemplateNameEnum ASYNC_APPROVAL = @@ -100,6 +103,8 @@ public T visit(Visitor visitor) { return visitor.visitVerifyEmail(); case MFA_OOB_CODE: return visitor.visitMfaOobCode(); + case AUTH_EMAIL_BY_CODE: + return visitor.visitAuthEmailByCode(); case RESET_EMAIL: return visitor.visitResetEmail(); case ASYNC_APPROVAL: @@ -135,6 +140,8 @@ public static EmailTemplateNameEnum valueOf(String value) { return VERIFY_EMAIL; case "mfa_oob_code": return MFA_OOB_CODE; + case "auth_email_by_code": + return AUTH_EMAIL_BY_CODE; case "reset_email": return RESET_EMAIL; case "async_approval": @@ -149,6 +156,8 @@ public enum Value { VERIFY_EMAIL_BY_CODE, + AUTH_EMAIL_BY_CODE, + RESET_EMAIL, RESET_EMAIL_BY_CODE, @@ -179,6 +188,8 @@ public interface Visitor { T visitVerifyEmailByCode(); + T visitAuthEmailByCode(); + T visitResetEmail(); T visitResetEmailByCode(); diff --git a/src/main/java/com/auth0/client/mgmt/types/FedCmLoginGooglePatch.java b/src/main/java/com/auth0/client/mgmt/types/FedCmLoginGooglePatch.java new file mode 100644 index 000000000..740e4b6dc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FedCmLoginGooglePatch.java @@ -0,0 +1,111 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = FedCmLoginGooglePatch.Builder.class) +public final class FedCmLoginGooglePatch { + private final Optional isEnabled; + + private final Map additionalProperties; + + private FedCmLoginGooglePatch(Optional isEnabled, Map additionalProperties) { + this.isEnabled = isEnabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return When true, shows the Google FedCM prompt on New Universal Login for this client + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof FedCmLoginGooglePatch && equalTo((FedCmLoginGooglePatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(FedCmLoginGooglePatch other) { + return isEnabled.equals(other.isEnabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isEnabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional isEnabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(FedCmLoginGooglePatch other) { + isEnabled(other.getIsEnabled()); + return this; + } + + /** + *

When true, shows the Google FedCM prompt on New Universal Login for this client

+ */ + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public Builder isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = Optional.ofNullable(isEnabled); + return this; + } + + public FedCmLoginGooglePatch build() { + return new FedCmLoginGooglePatch(isEnabled, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/FedCmLoginPatch.java b/src/main/java/com/auth0/client/mgmt/types/FedCmLoginPatch.java new file mode 100644 index 000000000..c51c3f9cd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FedCmLoginPatch.java @@ -0,0 +1,138 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = FedCmLoginPatch.Builder.class) +public final class FedCmLoginPatch { + private final OptionalNullable google; + + private final Map additionalProperties; + + private FedCmLoginPatch(OptionalNullable google, Map additionalProperties) { + this.google = google; + this.additionalProperties = additionalProperties; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("google") + public OptionalNullable getGoogle() { + if (google == null) { + return OptionalNullable.absent(); + } + return google; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("google") + private OptionalNullable _getGoogle() { + return google; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof FedCmLoginPatch && equalTo((FedCmLoginPatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(FedCmLoginPatch other) { + return google.equals(other.google); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.google); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private OptionalNullable google = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(FedCmLoginPatch other) { + google(other.getGoogle()); + return this; + } + + @JsonSetter(value = "google", nulls = Nulls.SKIP) + public Builder google(@Nullable OptionalNullable google) { + this.google = google; + return this; + } + + public Builder google(FedCmLoginGooglePatch google) { + this.google = OptionalNullable.of(google); + return this; + } + + public Builder google(Optional google) { + if (google.isPresent()) { + this.google = OptionalNullable.of(google.get()); + } else { + this.google = OptionalNullable.absent(); + } + return this; + } + + public Builder google(com.auth0.client.mgmt.core.Nullable google) { + if (google.isNull()) { + this.google = OptionalNullable.ofNull(); + } else if (google.isEmpty()) { + this.google = OptionalNullable.absent(); + } else { + this.google = OptionalNullable.of(google.get()); + } + return this; + } + + public FedCmLoginPatch build() { + return new FedCmLoginPatch(google, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java index 543dc75b9..33b4da237 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java @@ -96,6 +96,10 @@ public final class GetClientResponseContent { private final Optional initiateLoginUri; + private final Optional nativeSocialLogin; + + private final Optional fedcmLogin; + private final OptionalNullable refreshToken; private final OptionalNullable defaultOrganization; @@ -114,6 +118,8 @@ public final class GetClientResponseContent { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; @@ -183,6 +189,8 @@ private GetClientResponseContent( Optional> clientMetadata, Optional mobile, Optional initiateLoginUri, + Optional nativeSocialLogin, + Optional fedcmLogin, OptionalNullable refreshToken, OptionalNullable defaultOrganization, Optional organizationUsage, @@ -192,6 +200,7 @@ private GetClientResponseContent( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, Optional skipNonVerifiableCallbackUriConfirmationPrompt, Optional tokenExchange, @@ -244,6 +253,8 @@ private GetClientResponseContent( this.clientMetadata = clientMetadata; this.mobile = mobile; this.initiateLoginUri = initiateLoginUri; + this.nativeSocialLogin = nativeSocialLogin; + this.fedcmLogin = fedcmLogin; this.refreshToken = refreshToken; this.defaultOrganization = defaultOrganization; this.organizationUsage = organizationUsage; @@ -253,6 +264,7 @@ private GetClientResponseContent( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -541,6 +553,16 @@ public Optional getInitiateLoginUri() { return initiateLoginUri; } + @JsonProperty("native_social_login") + public Optional getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonProperty("fedcm_login") + public Optional getFedcmLogin() { + return fedcmLogin; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("refresh_token") public OptionalNullable getRefreshToken() { @@ -607,6 +629,11 @@ public Optional getSignedRequestObjec return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -803,6 +830,8 @@ private boolean equalTo(GetClientResponseContent other) { && clientMetadata.equals(other.clientMetadata) && mobile.equals(other.mobile) && initiateLoginUri.equals(other.initiateLoginUri) + && nativeSocialLogin.equals(other.nativeSocialLogin) + && fedcmLogin.equals(other.fedcmLogin) && refreshToken.equals(other.refreshToken) && defaultOrganization.equals(other.defaultOrganization) && organizationUsage.equals(other.organizationUsage) @@ -812,6 +841,7 @@ private boolean equalTo(GetClientResponseContent other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -869,6 +899,8 @@ public int hashCode() { this.clientMetadata, this.mobile, this.initiateLoginUri, + this.nativeSocialLogin, + this.fedcmLogin, this.refreshToken, this.defaultOrganization, this.organizationUsage, @@ -878,6 +910,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -978,6 +1011,10 @@ public static final class Builder { private Optional initiateLoginUri = Optional.empty(); + private Optional nativeSocialLogin = Optional.empty(); + + private Optional fedcmLogin = Optional.empty(); + private OptionalNullable refreshToken = OptionalNullable.absent(); private OptionalNullable defaultOrganization = OptionalNullable.absent(); @@ -996,6 +1033,9 @@ public static final class Builder { private Optional signedRequestObject = Optional.empty(); + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + private OptionalNullable complianceLevel = OptionalNullable.absent(); private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); @@ -1069,6 +1109,8 @@ public Builder from(GetClientResponseContent other) { clientMetadata(other.getClientMetadata()); mobile(other.getMobile()); initiateLoginUri(other.getInitiateLoginUri()); + nativeSocialLogin(other.getNativeSocialLogin()); + fedcmLogin(other.getFedcmLogin()); refreshToken(other.getRefreshToken()); defaultOrganization(other.getDefaultOrganization()); organizationUsage(other.getOrganizationUsage()); @@ -1078,6 +1120,7 @@ public Builder from(GetClientResponseContent other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1631,6 +1674,28 @@ public Builder initiateLoginUri(String initiateLoginUri) { return this; } + @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + this.nativeSocialLogin = nativeSocialLogin; + return this; + } + + public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { + this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + return this; + } + + @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) + public Builder fedcmLogin(Optional fedcmLogin) { + this.fedcmLogin = fedcmLogin; + return this; + } + + public Builder fedcmLogin(FedCmLogin fedcmLogin) { + this.fedcmLogin = Optional.ofNullable(fedcmLogin); + return this; + } + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) public Builder refreshToken(@Nullable OptionalNullable refreshToken) { this.refreshToken = refreshToken; @@ -1805,6 +1870,19 @@ public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId sig return this; } + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { this.complianceLevel = complianceLevel; @@ -2073,6 +2151,8 @@ public GetClientResponseContent build() { clientMetadata, mobile, initiateLoginUri, + nativeSocialLogin, + fedcmLogin, refreshToken, defaultOrganization, organizationUsage, @@ -2082,6 +2162,7 @@ public GetClientResponseContent build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java index 05f133f0e..b6f356949 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java @@ -46,6 +46,8 @@ public final class GetConnectionResponseContent { private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Map additionalProperties; private GetConnectionResponseContent( @@ -61,6 +63,7 @@ private GetConnectionResponseContent( Optional>> metadata, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -74,6 +77,7 @@ private GetConnectionResponseContent( this.metadata = metadata; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.additionalProperties = additionalProperties; } @@ -161,6 +165,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -184,7 +193,8 @@ private boolean equalTo(GetConnectionResponseContent other) { && showAsButton.equals(other.showAsButton) && metadata.equals(other.metadata) && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); + && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); } @java.lang.Override @@ -201,7 +211,8 @@ public int hashCode() { this.showAsButton, this.metadata, this.authentication, - this.connectedAccounts); + this.connectedAccounts, + this.crossAppAccessRequestingApp); } @java.lang.Override @@ -239,6 +250,8 @@ public static final class Builder { private Optional connectedAccounts = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -257,6 +270,7 @@ public Builder from(GetConnectionResponseContent other) { metadata(other.getMetadata()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); return this; } @@ -416,6 +430,17 @@ public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAcc return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + public GetConnectionResponseContent build() { return new GetConnectionResponseContent( name, @@ -430,6 +455,7 @@ public GetConnectionResponseContent build() { metadata, authentication, connectedAccounts, + crossAppAccessRequestingApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetPhoneProviderProtectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetPhoneProviderProtectionResponseContent.java new file mode 100644 index 000000000..2ecc76357 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetPhoneProviderProtectionResponseContent.java @@ -0,0 +1,120 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetPhoneProviderProtectionResponseContent.Builder.class) +public final class GetPhoneProviderProtectionResponseContent { + private final PhoneProviderProtectionBackoffStrategyEnum type; + + private final Map additionalProperties; + + private GetPhoneProviderProtectionResponseContent( + PhoneProviderProtectionBackoffStrategyEnum type, Map additionalProperties) { + this.type = type; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public PhoneProviderProtectionBackoffStrategyEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetPhoneProviderProtectionResponseContent + && equalTo((GetPhoneProviderProtectionResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetPhoneProviderProtectionResponseContent other) { + return type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TypeStage builder() { + return new Builder(); + } + + public interface TypeStage { + _FinalStage type(@NotNull PhoneProviderProtectionBackoffStrategyEnum type); + + Builder from(GetPhoneProviderProtectionResponseContent other); + } + + public interface _FinalStage { + GetPhoneProviderProtectionResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TypeStage, _FinalStage { + private PhoneProviderProtectionBackoffStrategyEnum type; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetPhoneProviderProtectionResponseContent other) { + type(other.getType()); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull PhoneProviderProtectionBackoffStrategyEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + public GetPhoneProviderProtectionResponseContent build() { + return new GetPhoneProviderProtectionResponseContent(type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java index c5b56d9aa..1875bc7f7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,9 +34,9 @@ public final class GetUserResponseContent { private final Optional phoneVerified; - private final Optional createdAt; + private final Optional createdAt; - private final Optional updatedAt; + private final Optional updatedAt; private final Optional> identities; @@ -51,13 +52,13 @@ public final class GetUserResponseContent { private final Optional> multifactor; - private final Optional multifactorLastModified; + private final Optional multifactorLastModified; private final Optional lastIp; - private final Optional lastLogin; + private final Optional lastLogin; - private final Optional lastPasswordReset; + private final Optional lastPasswordReset; private final Optional loginsCount; @@ -76,8 +77,8 @@ private GetUserResponseContent( Optional username, Optional phoneNumber, Optional phoneVerified, - Optional createdAt, - Optional updatedAt, + Optional createdAt, + Optional updatedAt, Optional> identities, Optional> appMetadata, Optional> userMetadata, @@ -85,10 +86,10 @@ private GetUserResponseContent( Optional name, Optional nickname, Optional> multifactor, - Optional multifactorLastModified, + Optional multifactorLastModified, Optional lastIp, - Optional lastLogin, - Optional lastPasswordReset, + Optional lastLogin, + Optional lastPasswordReset, Optional loginsCount, Optional blocked, Optional givenName, @@ -168,13 +169,19 @@ public Optional getPhoneVerified() { return phoneVerified; } + /** + * @return Date and time when this user was created. + */ @JsonProperty("created_at") - public Optional getCreatedAt() { + public Optional getCreatedAt() { return createdAt; } + /** + * @return Date and time when this user was last updated/modified. + */ @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public Optional getUpdatedAt() { return updatedAt; } @@ -228,8 +235,11 @@ public Optional> getMultifactor() { return multifactor; } + /** + * @return Last date and time this user's multi-factor authentication providers were updated. + */ @JsonProperty("multifactor_last_modified") - public Optional getMultifactorLastModified() { + public Optional getMultifactorLastModified() { return multifactorLastModified; } @@ -241,13 +251,19 @@ public Optional getLastIp() { return lastIp; } + /** + * @return Last date and time this user logged in. + */ @JsonProperty("last_login") - public Optional getLastLogin() { + public Optional getLastLogin() { return lastLogin; } + /** + * @return Last date and time this user had their password reset. + */ @JsonProperty("last_password_reset") - public Optional getLastPasswordReset() { + public Optional getLastPasswordReset() { return lastPasswordReset; } @@ -371,9 +387,9 @@ public static final class Builder { private Optional phoneVerified = Optional.empty(); - private Optional createdAt = Optional.empty(); + private Optional createdAt = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Optional updatedAt = Optional.empty(); private Optional> identities = Optional.empty(); @@ -389,13 +405,13 @@ public static final class Builder { private Optional> multifactor = Optional.empty(); - private Optional multifactorLastModified = Optional.empty(); + private Optional multifactorLastModified = Optional.empty(); private Optional lastIp = Optional.empty(); - private Optional lastLogin = Optional.empty(); + private Optional lastLogin = Optional.empty(); - private Optional lastPasswordReset = Optional.empty(); + private Optional lastPasswordReset = Optional.empty(); private Optional loginsCount = Optional.empty(); @@ -521,24 +537,30 @@ public Builder phoneVerified(Boolean phoneVerified) { return this; } + /** + *

Date and time when this user was created.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; return this; } - public Builder createdAt(UserDateSchema createdAt) { + public Builder createdAt(OffsetDateTime createdAt) { this.createdAt = Optional.ofNullable(createdAt); return this; } + /** + *

Date and time when this user was last updated/modified.

+ */ @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(Optional updatedAt) { this.updatedAt = updatedAt; return this; } - public Builder updatedAt(UserDateSchema updatedAt) { + public Builder updatedAt(OffsetDateTime updatedAt) { this.updatedAt = Optional.ofNullable(updatedAt); return this; } @@ -635,13 +657,16 @@ public Builder multifactor(List multifactor) { return this; } + /** + *

Last date and time this user's multi-factor authentication providers were updated.

+ */ @JsonSetter(value = "multifactor_last_modified", nulls = Nulls.SKIP) - public Builder multifactorLastModified(Optional multifactorLastModified) { + public Builder multifactorLastModified(Optional multifactorLastModified) { this.multifactorLastModified = multifactorLastModified; return this; } - public Builder multifactorLastModified(UserDateSchema multifactorLastModified) { + public Builder multifactorLastModified(OffsetDateTime multifactorLastModified) { this.multifactorLastModified = Optional.ofNullable(multifactorLastModified); return this; } @@ -660,24 +685,30 @@ public Builder lastIp(String lastIp) { return this; } + /** + *

Last date and time this user logged in.

+ */ @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { + public Builder lastLogin(Optional lastLogin) { this.lastLogin = lastLogin; return this; } - public Builder lastLogin(UserDateSchema lastLogin) { + public Builder lastLogin(OffsetDateTime lastLogin) { this.lastLogin = Optional.ofNullable(lastLogin); return this; } + /** + *

Last date and time this user had their password reset.

+ */ @JsonSetter(value = "last_password_reset", nulls = Nulls.SKIP) - public Builder lastPasswordReset(Optional lastPasswordReset) { + public Builder lastPasswordReset(Optional lastPasswordReset) { this.lastPasswordReset = lastPasswordReset; return this; } - public Builder lastPasswordReset(UserDateSchema lastPasswordReset) { + public Builder lastPasswordReset(OffsetDateTime lastPasswordReset) { this.lastPasswordReset = Optional.ofNullable(lastPasswordReset); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginApplePatch.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginApplePatch.java new file mode 100644 index 000000000..9c9cd82a2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginApplePatch.java @@ -0,0 +1,111 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = NativeSocialLoginApplePatch.Builder.class) +public final class NativeSocialLoginApplePatch { + private final Optional enabled; + + private final Map additionalProperties; + + private NativeSocialLoginApplePatch(Optional enabled, Map additionalProperties) { + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determine whether or not to allow signing in natively using an Apple authorization code + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NativeSocialLoginApplePatch && equalTo((NativeSocialLoginApplePatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NativeSocialLoginApplePatch other) { + return enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(NativeSocialLoginApplePatch other) { + enabled(other.getEnabled()); + return this; + } + + /** + *

Determine whether or not to allow signing in natively using an Apple authorization code

+ */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public NativeSocialLoginApplePatch build() { + return new NativeSocialLoginApplePatch(enabled, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginFacebookPatch.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginFacebookPatch.java new file mode 100644 index 000000000..c762d506f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginFacebookPatch.java @@ -0,0 +1,111 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = NativeSocialLoginFacebookPatch.Builder.class) +public final class NativeSocialLoginFacebookPatch { + private final Optional enabled; + + private final Map additionalProperties; + + private NativeSocialLoginFacebookPatch(Optional enabled, Map additionalProperties) { + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determine whether or not to allow signing in natively using Facebook + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NativeSocialLoginFacebookPatch && equalTo((NativeSocialLoginFacebookPatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NativeSocialLoginFacebookPatch other) { + return enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(NativeSocialLoginFacebookPatch other) { + enabled(other.getEnabled()); + return this; + } + + /** + *

Determine whether or not to allow signing in natively using Facebook

+ */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public NativeSocialLoginFacebookPatch build() { + return new NativeSocialLoginFacebookPatch(enabled, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginGooglePatch.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginGooglePatch.java new file mode 100644 index 000000000..d4bda0ffe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginGooglePatch.java @@ -0,0 +1,111 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = NativeSocialLoginGooglePatch.Builder.class) +public final class NativeSocialLoginGooglePatch { + private final Optional enabled; + + private final Map additionalProperties; + + private NativeSocialLoginGooglePatch(Optional enabled, Map additionalProperties) { + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determine whether or not to allow signing in natively using a Google ID token + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NativeSocialLoginGooglePatch && equalTo((NativeSocialLoginGooglePatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NativeSocialLoginGooglePatch other) { + return enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(NativeSocialLoginGooglePatch other) { + enabled(other.getEnabled()); + return this; + } + + /** + *

Determine whether or not to allow signing in natively using a Google ID token

+ */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public NativeSocialLoginGooglePatch build() { + return new NativeSocialLoginGooglePatch(enabled, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginPatch.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginPatch.java new file mode 100644 index 000000000..5e14699f1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginPatch.java @@ -0,0 +1,246 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = NativeSocialLoginPatch.Builder.class) +public final class NativeSocialLoginPatch { + private final OptionalNullable apple; + + private final OptionalNullable facebook; + + private final OptionalNullable google; + + private final Map additionalProperties; + + private NativeSocialLoginPatch( + OptionalNullable apple, + OptionalNullable facebook, + OptionalNullable google, + Map additionalProperties) { + this.apple = apple; + this.facebook = facebook; + this.google = google; + this.additionalProperties = additionalProperties; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("apple") + public OptionalNullable getApple() { + if (apple == null) { + return OptionalNullable.absent(); + } + return apple; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("facebook") + public OptionalNullable getFacebook() { + if (facebook == null) { + return OptionalNullable.absent(); + } + return facebook; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("google") + public OptionalNullable getGoogle() { + if (google == null) { + return OptionalNullable.absent(); + } + return google; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("apple") + private OptionalNullable _getApple() { + return apple; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("facebook") + private OptionalNullable _getFacebook() { + return facebook; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("google") + private OptionalNullable _getGoogle() { + return google; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NativeSocialLoginPatch && equalTo((NativeSocialLoginPatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NativeSocialLoginPatch other) { + return apple.equals(other.apple) && facebook.equals(other.facebook) && google.equals(other.google); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.apple, this.facebook, this.google); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private OptionalNullable apple = OptionalNullable.absent(); + + private OptionalNullable facebook = OptionalNullable.absent(); + + private OptionalNullable google = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(NativeSocialLoginPatch other) { + apple(other.getApple()); + facebook(other.getFacebook()); + google(other.getGoogle()); + return this; + } + + @JsonSetter(value = "apple", nulls = Nulls.SKIP) + public Builder apple(@Nullable OptionalNullable apple) { + this.apple = apple; + return this; + } + + public Builder apple(NativeSocialLoginApplePatch apple) { + this.apple = OptionalNullable.of(apple); + return this; + } + + public Builder apple(Optional apple) { + if (apple.isPresent()) { + this.apple = OptionalNullable.of(apple.get()); + } else { + this.apple = OptionalNullable.absent(); + } + return this; + } + + public Builder apple(com.auth0.client.mgmt.core.Nullable apple) { + if (apple.isNull()) { + this.apple = OptionalNullable.ofNull(); + } else if (apple.isEmpty()) { + this.apple = OptionalNullable.absent(); + } else { + this.apple = OptionalNullable.of(apple.get()); + } + return this; + } + + @JsonSetter(value = "facebook", nulls = Nulls.SKIP) + public Builder facebook(@Nullable OptionalNullable facebook) { + this.facebook = facebook; + return this; + } + + public Builder facebook(NativeSocialLoginFacebookPatch facebook) { + this.facebook = OptionalNullable.of(facebook); + return this; + } + + public Builder facebook(Optional facebook) { + if (facebook.isPresent()) { + this.facebook = OptionalNullable.of(facebook.get()); + } else { + this.facebook = OptionalNullable.absent(); + } + return this; + } + + public Builder facebook(com.auth0.client.mgmt.core.Nullable facebook) { + if (facebook.isNull()) { + this.facebook = OptionalNullable.ofNull(); + } else if (facebook.isEmpty()) { + this.facebook = OptionalNullable.absent(); + } else { + this.facebook = OptionalNullable.of(facebook.get()); + } + return this; + } + + @JsonSetter(value = "google", nulls = Nulls.SKIP) + public Builder google(@Nullable OptionalNullable google) { + this.google = google; + return this; + } + + public Builder google(NativeSocialLoginGooglePatch google) { + this.google = OptionalNullable.of(google); + return this; + } + + public Builder google(Optional google) { + if (google.isPresent()) { + this.google = OptionalNullable.of(google.get()); + } else { + this.google = OptionalNullable.absent(); + } + return this; + } + + public Builder google(com.auth0.client.mgmt.core.Nullable google) { + if (google.isNull()) { + this.google = OptionalNullable.ofNull(); + } else if (google.isEmpty()) { + this.google = OptionalNullable.absent(); + } else { + this.google = OptionalNullable.of(google.get()); + } + return this; + } + + public NativeSocialLoginPatch build() { + return new NativeSocialLoginPatch(apple, facebook, google, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PatchPhoneProviderProtectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/PatchPhoneProviderProtectionResponseContent.java new file mode 100644 index 000000000..46d99be79 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PatchPhoneProviderProtectionResponseContent.java @@ -0,0 +1,120 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PatchPhoneProviderProtectionResponseContent.Builder.class) +public final class PatchPhoneProviderProtectionResponseContent { + private final PhoneProviderProtectionBackoffStrategyEnum type; + + private final Map additionalProperties; + + private PatchPhoneProviderProtectionResponseContent( + PhoneProviderProtectionBackoffStrategyEnum type, Map additionalProperties) { + this.type = type; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public PhoneProviderProtectionBackoffStrategyEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchPhoneProviderProtectionResponseContent + && equalTo((PatchPhoneProviderProtectionResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PatchPhoneProviderProtectionResponseContent other) { + return type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TypeStage builder() { + return new Builder(); + } + + public interface TypeStage { + _FinalStage type(@NotNull PhoneProviderProtectionBackoffStrategyEnum type); + + Builder from(PatchPhoneProviderProtectionResponseContent other); + } + + public interface _FinalStage { + PatchPhoneProviderProtectionResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TypeStage, _FinalStage { + private PhoneProviderProtectionBackoffStrategyEnum type; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PatchPhoneProviderProtectionResponseContent other) { + type(other.getType()); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull PhoneProviderProtectionBackoffStrategyEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + public PatchPhoneProviderProtectionResponseContent build() { + return new PatchPhoneProviderProtectionResponseContent(type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderProtectionBackoffStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderProtectionBackoffStrategyEnum.java new file mode 100644 index 000000000..201e9adad --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderProtectionBackoffStrategyEnum.java @@ -0,0 +1,86 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class PhoneProviderProtectionBackoffStrategyEnum { + public static final PhoneProviderProtectionBackoffStrategyEnum EXPONENTIAL = + new PhoneProviderProtectionBackoffStrategyEnum(Value.EXPONENTIAL, "exponential"); + + public static final PhoneProviderProtectionBackoffStrategyEnum NONE = + new PhoneProviderProtectionBackoffStrategyEnum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + PhoneProviderProtectionBackoffStrategyEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof PhoneProviderProtectionBackoffStrategyEnum + && this.string.equals(((PhoneProviderProtectionBackoffStrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EXPONENTIAL: + return visitor.visitExponential(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static PhoneProviderProtectionBackoffStrategyEnum valueOf(String value) { + switch (value) { + case "exponential": + return EXPONENTIAL; + case "none": + return NONE; + default: + return new PhoneProviderProtectionBackoffStrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + EXPONENTIAL, + + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitExponential(); + + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java index 83bb3b674..d13d35855 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java @@ -96,6 +96,10 @@ public final class RotateClientSecretResponseContent { private final Optional initiateLoginUri; + private final Optional nativeSocialLogin; + + private final Optional fedcmLogin; + private final OptionalNullable refreshToken; private final OptionalNullable defaultOrganization; @@ -114,6 +118,8 @@ public final class RotateClientSecretResponseContent { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; @@ -183,6 +189,8 @@ private RotateClientSecretResponseContent( Optional> clientMetadata, Optional mobile, Optional initiateLoginUri, + Optional nativeSocialLogin, + Optional fedcmLogin, OptionalNullable refreshToken, OptionalNullable defaultOrganization, Optional organizationUsage, @@ -192,6 +200,7 @@ private RotateClientSecretResponseContent( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, Optional skipNonVerifiableCallbackUriConfirmationPrompt, Optional tokenExchange, @@ -244,6 +253,8 @@ private RotateClientSecretResponseContent( this.clientMetadata = clientMetadata; this.mobile = mobile; this.initiateLoginUri = initiateLoginUri; + this.nativeSocialLogin = nativeSocialLogin; + this.fedcmLogin = fedcmLogin; this.refreshToken = refreshToken; this.defaultOrganization = defaultOrganization; this.organizationUsage = organizationUsage; @@ -253,6 +264,7 @@ private RotateClientSecretResponseContent( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -541,6 +553,16 @@ public Optional getInitiateLoginUri() { return initiateLoginUri; } + @JsonProperty("native_social_login") + public Optional getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonProperty("fedcm_login") + public Optional getFedcmLogin() { + return fedcmLogin; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("refresh_token") public OptionalNullable getRefreshToken() { @@ -607,6 +629,11 @@ public Optional getSignedRequestObjec return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -803,6 +830,8 @@ private boolean equalTo(RotateClientSecretResponseContent other) { && clientMetadata.equals(other.clientMetadata) && mobile.equals(other.mobile) && initiateLoginUri.equals(other.initiateLoginUri) + && nativeSocialLogin.equals(other.nativeSocialLogin) + && fedcmLogin.equals(other.fedcmLogin) && refreshToken.equals(other.refreshToken) && defaultOrganization.equals(other.defaultOrganization) && organizationUsage.equals(other.organizationUsage) @@ -812,6 +841,7 @@ private boolean equalTo(RotateClientSecretResponseContent other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -869,6 +899,8 @@ public int hashCode() { this.clientMetadata, this.mobile, this.initiateLoginUri, + this.nativeSocialLogin, + this.fedcmLogin, this.refreshToken, this.defaultOrganization, this.organizationUsage, @@ -878,6 +910,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -978,6 +1011,10 @@ public static final class Builder { private Optional initiateLoginUri = Optional.empty(); + private Optional nativeSocialLogin = Optional.empty(); + + private Optional fedcmLogin = Optional.empty(); + private OptionalNullable refreshToken = OptionalNullable.absent(); private OptionalNullable defaultOrganization = OptionalNullable.absent(); @@ -996,6 +1033,9 @@ public static final class Builder { private Optional signedRequestObject = Optional.empty(); + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + private OptionalNullable complianceLevel = OptionalNullable.absent(); private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); @@ -1069,6 +1109,8 @@ public Builder from(RotateClientSecretResponseContent other) { clientMetadata(other.getClientMetadata()); mobile(other.getMobile()); initiateLoginUri(other.getInitiateLoginUri()); + nativeSocialLogin(other.getNativeSocialLogin()); + fedcmLogin(other.getFedcmLogin()); refreshToken(other.getRefreshToken()); defaultOrganization(other.getDefaultOrganization()); organizationUsage(other.getOrganizationUsage()); @@ -1078,6 +1120,7 @@ public Builder from(RotateClientSecretResponseContent other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1631,6 +1674,28 @@ public Builder initiateLoginUri(String initiateLoginUri) { return this; } + @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + this.nativeSocialLogin = nativeSocialLogin; + return this; + } + + public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { + this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + return this; + } + + @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) + public Builder fedcmLogin(Optional fedcmLogin) { + this.fedcmLogin = fedcmLogin; + return this; + } + + public Builder fedcmLogin(FedCmLogin fedcmLogin) { + this.fedcmLogin = Optional.ofNullable(fedcmLogin); + return this; + } + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) public Builder refreshToken(@Nullable OptionalNullable refreshToken) { this.refreshToken = refreshToken; @@ -1805,6 +1870,19 @@ public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId sig return this; } + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { this.complianceLevel = complianceLevel; @@ -2073,6 +2151,8 @@ public RotateClientSecretResponseContent build() { clientMetadata, mobile, initiateLoginUri, + nativeSocialLogin, + fedcmLogin, refreshToken, defaultOrganization, organizationUsage, @@ -2082,6 +2162,7 @@ public RotateClientSecretResponseContent build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java index 734cd0332..e61598385 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java @@ -92,9 +92,9 @@ public final class UpdateClientRequestContent { private final Optional initiateLoginUri; - private final Optional nativeSocialLogin; + private final OptionalNullable nativeSocialLogin; - private final Optional fedcmLogin; + private final OptionalNullable fedcmLogin; private final OptionalNullable refreshToken; @@ -114,6 +114,8 @@ public final class UpdateClientRequestContent { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; @@ -169,8 +171,8 @@ private UpdateClientRequestContent( Optional> clientMetadata, Optional mobile, Optional initiateLoginUri, - Optional nativeSocialLogin, - Optional fedcmLogin, + OptionalNullable nativeSocialLogin, + OptionalNullable fedcmLogin, OptionalNullable refreshToken, OptionalNullable defaultOrganization, OptionalNullable organizationUsage, @@ -180,6 +182,7 @@ private UpdateClientRequestContent( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, OptionalNullable tokenExchange, @@ -235,6 +238,7 @@ private UpdateClientRequestContent( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -515,13 +519,21 @@ public Optional getInitiateLoginUri() { return initiateLoginUri; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("native_social_login") - public Optional getNativeSocialLogin() { + public OptionalNullable getNativeSocialLogin() { + if (nativeSocialLogin == null) { + return OptionalNullable.absent(); + } return nativeSocialLogin; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("fedcm_login") - public Optional getFedcmLogin() { + public OptionalNullable getFedcmLogin() { + if (fedcmLogin == null) { + return OptionalNullable.absent(); + } return fedcmLogin; } @@ -603,6 +615,11 @@ public Optional getSignedRequestObjec return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -714,6 +731,18 @@ private OptionalNullable _getTokenQuota() { return tokenQuota; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("native_social_login") + private OptionalNullable _getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fedcm_login") + private OptionalNullable _getFedcmLogin() { + return fedcmLogin; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("refresh_token") private OptionalNullable _getRefreshToken() { @@ -849,6 +878,7 @@ private boolean equalTo(UpdateClientRequestContent other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -909,6 +939,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -1000,9 +1031,9 @@ public static final class Builder { private Optional initiateLoginUri = Optional.empty(); - private Optional nativeSocialLogin = Optional.empty(); + private OptionalNullable nativeSocialLogin = OptionalNullable.absent(); - private Optional fedcmLogin = Optional.empty(); + private OptionalNullable fedcmLogin = OptionalNullable.absent(); private OptionalNullable refreshToken = OptionalNullable.absent(); @@ -1024,6 +1055,9 @@ public static final class Builder { private Optional signedRequestObject = Optional.empty(); + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + private OptionalNullable complianceLevel = OptionalNullable.absent(); private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); @@ -1095,6 +1129,7 @@ public Builder from(UpdateClientRequestContent other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1664,24 +1699,65 @@ public Builder initiateLoginUri(String initiateLoginUri) { } @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) - public Builder nativeSocialLogin(Optional nativeSocialLogin) { + public Builder nativeSocialLogin(@Nullable OptionalNullable nativeSocialLogin) { this.nativeSocialLogin = nativeSocialLogin; return this; } - public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { - this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + public Builder nativeSocialLogin(NativeSocialLoginPatch nativeSocialLogin) { + this.nativeSocialLogin = OptionalNullable.of(nativeSocialLogin); + return this; + } + + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + if (nativeSocialLogin.isPresent()) { + this.nativeSocialLogin = OptionalNullable.of(nativeSocialLogin.get()); + } else { + this.nativeSocialLogin = OptionalNullable.absent(); + } + return this; + } + + public Builder nativeSocialLogin( + com.auth0.client.mgmt.core.Nullable nativeSocialLogin) { + if (nativeSocialLogin.isNull()) { + this.nativeSocialLogin = OptionalNullable.ofNull(); + } else if (nativeSocialLogin.isEmpty()) { + this.nativeSocialLogin = OptionalNullable.absent(); + } else { + this.nativeSocialLogin = OptionalNullable.of(nativeSocialLogin.get()); + } return this; } @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) - public Builder fedcmLogin(Optional fedcmLogin) { + public Builder fedcmLogin(@Nullable OptionalNullable fedcmLogin) { this.fedcmLogin = fedcmLogin; return this; } - public Builder fedcmLogin(FedCmLogin fedcmLogin) { - this.fedcmLogin = Optional.ofNullable(fedcmLogin); + public Builder fedcmLogin(FedCmLoginPatch fedcmLogin) { + this.fedcmLogin = OptionalNullable.of(fedcmLogin); + return this; + } + + public Builder fedcmLogin(Optional fedcmLogin) { + if (fedcmLogin.isPresent()) { + this.fedcmLogin = OptionalNullable.of(fedcmLogin.get()); + } else { + this.fedcmLogin = OptionalNullable.absent(); + } + return this; + } + + public Builder fedcmLogin(com.auth0.client.mgmt.core.Nullable fedcmLogin) { + if (fedcmLogin.isNull()) { + this.fedcmLogin = OptionalNullable.ofNull(); + } else if (fedcmLogin.isEmpty()) { + this.fedcmLogin = OptionalNullable.absent(); + } else { + this.fedcmLogin = OptionalNullable.of(fedcmLogin.get()); + } return this; } @@ -1928,6 +2004,19 @@ public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId sig return this; } + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { this.complianceLevel = complianceLevel; @@ -2243,6 +2332,7 @@ public UpdateClientRequestContent build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java index 2d25bf1f9..05f995ff6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java @@ -96,6 +96,10 @@ public final class UpdateClientResponseContent { private final Optional initiateLoginUri; + private final Optional nativeSocialLogin; + + private final Optional fedcmLogin; + private final OptionalNullable refreshToken; private final OptionalNullable defaultOrganization; @@ -114,6 +118,8 @@ public final class UpdateClientResponseContent { private final Optional signedRequestObject; + private final Optional tokenVaultPrivilegedAccess; + private final OptionalNullable complianceLevel; private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; @@ -183,6 +189,8 @@ private UpdateClientResponseContent( Optional> clientMetadata, Optional mobile, Optional initiateLoginUri, + Optional nativeSocialLogin, + Optional fedcmLogin, OptionalNullable refreshToken, OptionalNullable defaultOrganization, Optional organizationUsage, @@ -192,6 +200,7 @@ private UpdateClientResponseContent( Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, OptionalNullable complianceLevel, Optional skipNonVerifiableCallbackUriConfirmationPrompt, Optional tokenExchange, @@ -244,6 +253,8 @@ private UpdateClientResponseContent( this.clientMetadata = clientMetadata; this.mobile = mobile; this.initiateLoginUri = initiateLoginUri; + this.nativeSocialLogin = nativeSocialLogin; + this.fedcmLogin = fedcmLogin; this.refreshToken = refreshToken; this.defaultOrganization = defaultOrganization; this.organizationUsage = organizationUsage; @@ -253,6 +264,7 @@ private UpdateClientResponseContent( this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireProofOfPossession = requireProofOfPossession; this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; this.complianceLevel = complianceLevel; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.tokenExchange = tokenExchange; @@ -541,6 +553,16 @@ public Optional getInitiateLoginUri() { return initiateLoginUri; } + @JsonProperty("native_social_login") + public Optional getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonProperty("fedcm_login") + public Optional getFedcmLogin() { + return fedcmLogin; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("refresh_token") public OptionalNullable getRefreshToken() { @@ -607,6 +629,11 @@ public Optional getSignedRequestObjec return signedRequestObject; } + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("compliance_level") public OptionalNullable getComplianceLevel() { @@ -803,6 +830,8 @@ private boolean equalTo(UpdateClientResponseContent other) { && clientMetadata.equals(other.clientMetadata) && mobile.equals(other.mobile) && initiateLoginUri.equals(other.initiateLoginUri) + && nativeSocialLogin.equals(other.nativeSocialLogin) + && fedcmLogin.equals(other.fedcmLogin) && refreshToken.equals(other.refreshToken) && defaultOrganization.equals(other.defaultOrganization) && organizationUsage.equals(other.organizationUsage) @@ -812,6 +841,7 @@ private boolean equalTo(UpdateClientResponseContent other) { && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireProofOfPossession.equals(other.requireProofOfPossession) && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) && complianceLevel.equals(other.complianceLevel) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) @@ -869,6 +899,8 @@ public int hashCode() { this.clientMetadata, this.mobile, this.initiateLoginUri, + this.nativeSocialLogin, + this.fedcmLogin, this.refreshToken, this.defaultOrganization, this.organizationUsage, @@ -878,6 +910,7 @@ public int hashCode() { this.requirePushedAuthorizationRequests, this.requireProofOfPossession, this.signedRequestObject, + this.tokenVaultPrivilegedAccess, this.complianceLevel, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.tokenExchange, @@ -978,6 +1011,10 @@ public static final class Builder { private Optional initiateLoginUri = Optional.empty(); + private Optional nativeSocialLogin = Optional.empty(); + + private Optional fedcmLogin = Optional.empty(); + private OptionalNullable refreshToken = OptionalNullable.absent(); private OptionalNullable defaultOrganization = OptionalNullable.absent(); @@ -996,6 +1033,9 @@ public static final class Builder { private Optional signedRequestObject = Optional.empty(); + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + private OptionalNullable complianceLevel = OptionalNullable.absent(); private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); @@ -1069,6 +1109,8 @@ public Builder from(UpdateClientResponseContent other) { clientMetadata(other.getClientMetadata()); mobile(other.getMobile()); initiateLoginUri(other.getInitiateLoginUri()); + nativeSocialLogin(other.getNativeSocialLogin()); + fedcmLogin(other.getFedcmLogin()); refreshToken(other.getRefreshToken()); defaultOrganization(other.getDefaultOrganization()); organizationUsage(other.getOrganizationUsage()); @@ -1078,6 +1120,7 @@ public Builder from(UpdateClientResponseContent other) { requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireProofOfPossession(other.getRequireProofOfPossession()); signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); complianceLevel(other.getComplianceLevel()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); tokenExchange(other.getTokenExchange()); @@ -1631,6 +1674,28 @@ public Builder initiateLoginUri(String initiateLoginUri) { return this; } + @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + this.nativeSocialLogin = nativeSocialLogin; + return this; + } + + public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { + this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + return this; + } + + @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) + public Builder fedcmLogin(Optional fedcmLogin) { + this.fedcmLogin = fedcmLogin; + return this; + } + + public Builder fedcmLogin(FedCmLogin fedcmLogin) { + this.fedcmLogin = Optional.ofNullable(fedcmLogin); + return this; + } + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) public Builder refreshToken(@Nullable OptionalNullable refreshToken) { this.refreshToken = refreshToken; @@ -1805,6 +1870,19 @@ public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId sig return this; } + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { this.complianceLevel = complianceLevel; @@ -2073,6 +2151,8 @@ public UpdateClientResponseContent build() { clientMetadata, mobile, initiateLoginUri, + nativeSocialLogin, + fedcmLogin, refreshToken, defaultOrganization, organizationUsage, @@ -2082,6 +2162,7 @@ public UpdateClientResponseContent build() { requirePushedAuthorizationRequests, requireProofOfPossession, signedRequestObject, + tokenVaultPrivilegedAccess, complianceLevel, skipNonVerifiableCallbackUriConfirmationPrompt, tokenExchange, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java index c528a7db0..350b4450e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java @@ -42,6 +42,8 @@ public final class UpdateConnectionRequestContent { private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Map additionalProperties; private UpdateConnectionRequestContent( @@ -54,6 +56,7 @@ private UpdateConnectionRequestContent( Optional>> metadata, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Map additionalProperties) { this.displayName = displayName; this.options = options; @@ -64,6 +67,7 @@ private UpdateConnectionRequestContent( this.metadata = metadata; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.additionalProperties = additionalProperties; } @@ -135,6 +139,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("options") private OptionalNullable _getOptions() { @@ -167,7 +176,8 @@ private boolean equalTo(UpdateConnectionRequestContent other) { && realms.equals(other.realms) && metadata.equals(other.metadata) && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); + && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); } @java.lang.Override @@ -181,7 +191,8 @@ public int hashCode() { this.realms, this.metadata, this.authentication, - this.connectedAccounts); + this.connectedAccounts, + this.crossAppAccessRequestingApp); } @java.lang.Override @@ -213,6 +224,8 @@ public static final class Builder { private Optional connectedAccounts = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -228,6 +241,7 @@ public Builder from(UpdateConnectionRequestContent other) { metadata(other.getMetadata()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); return this; } @@ -385,6 +399,17 @@ public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAcc return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + public UpdateConnectionRequestContent build() { return new UpdateConnectionRequestContent( displayName, @@ -396,6 +421,7 @@ public UpdateConnectionRequestContent build() { metadata, authentication, connectedAccounts, + crossAppAccessRequestingApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java index 459b68a66..05027d0bf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java @@ -36,6 +36,8 @@ public final class UpdateConnectionRequestContentOidc implements IConnectionComm private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Optional showAsButton; private final Map additionalProperties; @@ -48,6 +50,7 @@ private UpdateConnectionRequestContentOidc( Optional options, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Optional showAsButton, Map additionalProperties) { this.displayName = displayName; @@ -57,6 +60,7 @@ private UpdateConnectionRequestContentOidc( this.options = options; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; } @@ -100,6 +104,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonProperty("show_as_button") public Optional getShowAsButton() { return showAsButton; @@ -125,6 +134,7 @@ private boolean equalTo(UpdateConnectionRequestContentOidc other) { && options.equals(other.options) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) && showAsButton.equals(other.showAsButton); } @@ -138,6 +148,7 @@ public int hashCode() { this.options, this.authentication, this.connectedAccounts, + this.crossAppAccessRequestingApp, this.showAsButton); } @@ -166,6 +177,8 @@ public static final class Builder { private Optional connectedAccounts = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional showAsButton = Optional.empty(); @JsonAnySetter @@ -181,6 +194,7 @@ public Builder from(UpdateConnectionRequestContentOidc other) { options(other.getOptions()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); showAsButton(other.getShowAsButton()); return this; } @@ -262,6 +276,17 @@ public Builder connectedAccounts(ConnectionConnectedAccountsPurposeXaa connected return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) public Builder showAsButton(Optional showAsButton) { this.showAsButton = showAsButton; @@ -282,6 +307,7 @@ public UpdateConnectionRequestContentOidc build() { options, authentication, connectedAccounts, + crossAppAccessRequestingApp, showAsButton, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java index 92c8bf226..34c119fb8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java @@ -30,6 +30,8 @@ public final class UpdateConnectionRequestContentOkta implements IConnectionComm private final Optional>> metadata; + private final Optional crossAppAccessRequestingApp; + private final Optional options; private final Optional showAsButton; @@ -41,6 +43,7 @@ private UpdateConnectionRequestContentOkta( Optional> enabledClients, Optional isDomainConnection, Optional>> metadata, + Optional crossAppAccessRequestingApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -48,6 +51,7 @@ private UpdateConnectionRequestContentOkta( this.enabledClients = enabledClients; this.isDomainConnection = isDomainConnection; this.metadata = metadata; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -77,6 +81,11 @@ public Optional>> getMetadata() { return metadata; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -104,6 +113,7 @@ private boolean equalTo(UpdateConnectionRequestContentOkta other) { && enabledClients.equals(other.enabledClients) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -115,6 +125,7 @@ public int hashCode() { this.enabledClients, this.isDomainConnection, this.metadata, + this.crossAppAccessRequestingApp, this.options, this.showAsButton); } @@ -138,6 +149,8 @@ public static final class Builder { private Optional>> metadata = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional options = Optional.empty(); private Optional showAsButton = Optional.empty(); @@ -152,6 +165,7 @@ public Builder from(UpdateConnectionRequestContentOkta other) { enabledClients(other.getEnabledClients()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -201,6 +215,17 @@ public Builder metadata(Map> metadata) { return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + @JsonSetter(value = "options", nulls = Nulls.SKIP) public Builder options(Optional options) { this.options = options; @@ -229,6 +254,7 @@ public UpdateConnectionRequestContentOkta build() { enabledClients, isDomainConnection, metadata, + crossAppAccessRequestingApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java index f708907ca..bcdd4cdf9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java @@ -46,6 +46,8 @@ public final class UpdateConnectionResponseContent { private final Optional connectedAccounts; + private final Optional crossAppAccessRequestingApp; + private final Map additionalProperties; private UpdateConnectionResponseContent( @@ -61,6 +63,7 @@ private UpdateConnectionResponseContent( Optional>> metadata, Optional authentication, Optional connectedAccounts, + Optional crossAppAccessRequestingApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -74,6 +77,7 @@ private UpdateConnectionResponseContent( this.metadata = metadata; this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; this.additionalProperties = additionalProperties; } @@ -161,6 +165,11 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -184,7 +193,8 @@ private boolean equalTo(UpdateConnectionResponseContent other) { && showAsButton.equals(other.showAsButton) && metadata.equals(other.metadata) && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); + && connectedAccounts.equals(other.connectedAccounts) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); } @java.lang.Override @@ -201,7 +211,8 @@ public int hashCode() { this.showAsButton, this.metadata, this.authentication, - this.connectedAccounts); + this.connectedAccounts, + this.crossAppAccessRequestingApp); } @java.lang.Override @@ -239,6 +250,8 @@ public static final class Builder { private Optional connectedAccounts = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -257,6 +270,7 @@ public Builder from(UpdateConnectionResponseContent other) { metadata(other.getMetadata()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); return this; } @@ -416,6 +430,17 @@ public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAcc return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + public UpdateConnectionResponseContent build() { return new UpdateConnectionResponseContent( name, @@ -430,6 +455,7 @@ public UpdateConnectionResponseContent build() { metadata, authentication, connectedAccounts, + crossAppAccessRequestingApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java index c89554e6c..551b010d8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,9 +34,9 @@ public final class UpdateUserResponseContent { private final Optional phoneVerified; - private final Optional createdAt; + private final Optional createdAt; - private final Optional updatedAt; + private final Optional updatedAt; private final Optional> identities; @@ -51,13 +52,13 @@ public final class UpdateUserResponseContent { private final Optional> multifactor; - private final Optional multifactorLastModified; + private final Optional multifactorLastModified; private final Optional lastIp; - private final Optional lastLogin; + private final Optional lastLogin; - private final Optional lastPasswordReset; + private final Optional lastPasswordReset; private final Optional loginsCount; @@ -76,8 +77,8 @@ private UpdateUserResponseContent( Optional username, Optional phoneNumber, Optional phoneVerified, - Optional createdAt, - Optional updatedAt, + Optional createdAt, + Optional updatedAt, Optional> identities, Optional> appMetadata, Optional> userMetadata, @@ -85,10 +86,10 @@ private UpdateUserResponseContent( Optional name, Optional nickname, Optional> multifactor, - Optional multifactorLastModified, + Optional multifactorLastModified, Optional lastIp, - Optional lastLogin, - Optional lastPasswordReset, + Optional lastLogin, + Optional lastPasswordReset, Optional loginsCount, Optional blocked, Optional givenName, @@ -168,13 +169,19 @@ public Optional getPhoneVerified() { return phoneVerified; } + /** + * @return Date and time when this user was created. + */ @JsonProperty("created_at") - public Optional getCreatedAt() { + public Optional getCreatedAt() { return createdAt; } + /** + * @return Date and time when this user was last updated/modified. + */ @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public Optional getUpdatedAt() { return updatedAt; } @@ -228,8 +235,11 @@ public Optional> getMultifactor() { return multifactor; } + /** + * @return Last date and time this user's multi-factor authentication providers were updated. + */ @JsonProperty("multifactor_last_modified") - public Optional getMultifactorLastModified() { + public Optional getMultifactorLastModified() { return multifactorLastModified; } @@ -241,13 +251,19 @@ public Optional getLastIp() { return lastIp; } + /** + * @return Last date and time this user logged in. + */ @JsonProperty("last_login") - public Optional getLastLogin() { + public Optional getLastLogin() { return lastLogin; } + /** + * @return Last date and time this user had their password reset. + */ @JsonProperty("last_password_reset") - public Optional getLastPasswordReset() { + public Optional getLastPasswordReset() { return lastPasswordReset; } @@ -371,9 +387,9 @@ public static final class Builder { private Optional phoneVerified = Optional.empty(); - private Optional createdAt = Optional.empty(); + private Optional createdAt = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Optional updatedAt = Optional.empty(); private Optional> identities = Optional.empty(); @@ -389,13 +405,13 @@ public static final class Builder { private Optional> multifactor = Optional.empty(); - private Optional multifactorLastModified = Optional.empty(); + private Optional multifactorLastModified = Optional.empty(); private Optional lastIp = Optional.empty(); - private Optional lastLogin = Optional.empty(); + private Optional lastLogin = Optional.empty(); - private Optional lastPasswordReset = Optional.empty(); + private Optional lastPasswordReset = Optional.empty(); private Optional loginsCount = Optional.empty(); @@ -521,24 +537,30 @@ public Builder phoneVerified(Boolean phoneVerified) { return this; } + /** + *

Date and time when this user was created.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; return this; } - public Builder createdAt(UserDateSchema createdAt) { + public Builder createdAt(OffsetDateTime createdAt) { this.createdAt = Optional.ofNullable(createdAt); return this; } + /** + *

Date and time when this user was last updated/modified.

+ */ @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(Optional updatedAt) { this.updatedAt = updatedAt; return this; } - public Builder updatedAt(UserDateSchema updatedAt) { + public Builder updatedAt(OffsetDateTime updatedAt) { this.updatedAt = Optional.ofNullable(updatedAt); return this; } @@ -635,13 +657,16 @@ public Builder multifactor(List multifactor) { return this; } + /** + *

Last date and time this user's multi-factor authentication providers were updated.

+ */ @JsonSetter(value = "multifactor_last_modified", nulls = Nulls.SKIP) - public Builder multifactorLastModified(Optional multifactorLastModified) { + public Builder multifactorLastModified(Optional multifactorLastModified) { this.multifactorLastModified = multifactorLastModified; return this; } - public Builder multifactorLastModified(UserDateSchema multifactorLastModified) { + public Builder multifactorLastModified(OffsetDateTime multifactorLastModified) { this.multifactorLastModified = Optional.ofNullable(multifactorLastModified); return this; } @@ -660,24 +685,30 @@ public Builder lastIp(String lastIp) { return this; } + /** + *

Last date and time this user logged in.

+ */ @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { + public Builder lastLogin(Optional lastLogin) { this.lastLogin = lastLogin; return this; } - public Builder lastLogin(UserDateSchema lastLogin) { + public Builder lastLogin(OffsetDateTime lastLogin) { this.lastLogin = Optional.ofNullable(lastLogin); return this; } + /** + *

Last date and time this user had their password reset.

+ */ @JsonSetter(value = "last_password_reset", nulls = Nulls.SKIP) - public Builder lastPasswordReset(Optional lastPasswordReset) { + public Builder lastPasswordReset(Optional lastPasswordReset) { this.lastPasswordReset = lastPasswordReset; return this; } - public Builder lastPasswordReset(UserDateSchema lastPasswordReset) { + public Builder lastPasswordReset(OffsetDateTime lastPasswordReset) { this.lastPasswordReset = Optional.ofNullable(lastPasswordReset); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UserDateSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserDateSchema.java deleted file mode 100644 index 425e496ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserDateSchema.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import java.io.IOException; -import java.util.Map; -import java.util.Objects; - -@JsonDeserialize(using = UserDateSchema.Deserializer.class) -public final class UserDateSchema { - private final Object value; - - private final int type; - - private UserDateSchema(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - @SuppressWarnings("unchecked") - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((String) this.value); - } else if (this.type == 1) { - return visitor.visit((Map) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserDateSchema && equalTo((UserDateSchema) other); - } - - private boolean equalTo(UserDateSchema other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static UserDateSchema of(String value) { - return new UserDateSchema(value, 0); - } - - public static UserDateSchema of(Map value) { - return new UserDateSchema(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UserDateSchema.class); - } - - @java.lang.Override - public UserDateSchema deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java b/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java index e2064a5b8..469f0fd30 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java @@ -22,7 +22,7 @@ public final class UserIdentitySchema { private final Optional connection; - private final Optional userId; + private final Optional userId; private final Optional provider; @@ -40,7 +40,7 @@ public final class UserIdentitySchema { private UserIdentitySchema( Optional connection, - Optional userId, + Optional userId, Optional provider, Optional isSocial, Optional accessToken, @@ -67,11 +67,8 @@ public Optional getConnection() { return connection; } - /** - * @return Unique identifier of the user user for this identity. - */ @JsonProperty("user_id") - public Optional getUserId() { + public Optional getUserId() { return userId; } @@ -165,7 +162,7 @@ public static Builder builder() { public static final class Builder { private Optional connection = Optional.empty(); - private Optional userId = Optional.empty(); + private Optional userId = Optional.empty(); private Optional provider = Optional.empty(); @@ -210,16 +207,13 @@ public Builder connection(String connection) { return this; } - /** - *

Unique identifier of the user user for this identity.

- */ @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { + public Builder userId(Optional userId) { this.userId = userId; return this; } - public Builder userId(String userId) { + public Builder userId(UserId userId) { this.userId = Optional.ofNullable(userId); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java index c5ef60222..86ab73f57 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,9 +34,9 @@ public final class UserResponseSchema { private final Optional phoneVerified; - private final Optional createdAt; + private final Optional createdAt; - private final Optional updatedAt; + private final Optional updatedAt; private final Optional> identities; @@ -51,13 +52,13 @@ public final class UserResponseSchema { private final Optional> multifactor; - private final Optional multifactorLastModified; + private final Optional multifactorLastModified; private final Optional lastIp; - private final Optional lastLogin; + private final Optional lastLogin; - private final Optional lastPasswordReset; + private final Optional lastPasswordReset; private final Optional loginsCount; @@ -76,8 +77,8 @@ private UserResponseSchema( Optional username, Optional phoneNumber, Optional phoneVerified, - Optional createdAt, - Optional updatedAt, + Optional createdAt, + Optional updatedAt, Optional> identities, Optional> appMetadata, Optional> userMetadata, @@ -85,10 +86,10 @@ private UserResponseSchema( Optional name, Optional nickname, Optional> multifactor, - Optional multifactorLastModified, + Optional multifactorLastModified, Optional lastIp, - Optional lastLogin, - Optional lastPasswordReset, + Optional lastLogin, + Optional lastPasswordReset, Optional loginsCount, Optional blocked, Optional givenName, @@ -168,13 +169,19 @@ public Optional getPhoneVerified() { return phoneVerified; } + /** + * @return Date and time when this user was created. + */ @JsonProperty("created_at") - public Optional getCreatedAt() { + public Optional getCreatedAt() { return createdAt; } + /** + * @return Date and time when this user was last updated/modified. + */ @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public Optional getUpdatedAt() { return updatedAt; } @@ -228,8 +235,11 @@ public Optional> getMultifactor() { return multifactor; } + /** + * @return Last date and time this user's multi-factor authentication providers were updated. + */ @JsonProperty("multifactor_last_modified") - public Optional getMultifactorLastModified() { + public Optional getMultifactorLastModified() { return multifactorLastModified; } @@ -241,13 +251,19 @@ public Optional getLastIp() { return lastIp; } + /** + * @return Last date and time this user logged in. + */ @JsonProperty("last_login") - public Optional getLastLogin() { + public Optional getLastLogin() { return lastLogin; } + /** + * @return Last date and time this user had their password reset. + */ @JsonProperty("last_password_reset") - public Optional getLastPasswordReset() { + public Optional getLastPasswordReset() { return lastPasswordReset; } @@ -371,9 +387,9 @@ public static final class Builder { private Optional phoneVerified = Optional.empty(); - private Optional createdAt = Optional.empty(); + private Optional createdAt = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Optional updatedAt = Optional.empty(); private Optional> identities = Optional.empty(); @@ -389,13 +405,13 @@ public static final class Builder { private Optional> multifactor = Optional.empty(); - private Optional multifactorLastModified = Optional.empty(); + private Optional multifactorLastModified = Optional.empty(); private Optional lastIp = Optional.empty(); - private Optional lastLogin = Optional.empty(); + private Optional lastLogin = Optional.empty(); - private Optional lastPasswordReset = Optional.empty(); + private Optional lastPasswordReset = Optional.empty(); private Optional loginsCount = Optional.empty(); @@ -521,24 +537,30 @@ public Builder phoneVerified(Boolean phoneVerified) { return this; } + /** + *

Date and time when this user was created.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; return this; } - public Builder createdAt(UserDateSchema createdAt) { + public Builder createdAt(OffsetDateTime createdAt) { this.createdAt = Optional.ofNullable(createdAt); return this; } + /** + *

Date and time when this user was last updated/modified.

+ */ @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(Optional updatedAt) { this.updatedAt = updatedAt; return this; } - public Builder updatedAt(UserDateSchema updatedAt) { + public Builder updatedAt(OffsetDateTime updatedAt) { this.updatedAt = Optional.ofNullable(updatedAt); return this; } @@ -635,13 +657,16 @@ public Builder multifactor(List multifactor) { return this; } + /** + *

Last date and time this user's multi-factor authentication providers were updated.

+ */ @JsonSetter(value = "multifactor_last_modified", nulls = Nulls.SKIP) - public Builder multifactorLastModified(Optional multifactorLastModified) { + public Builder multifactorLastModified(Optional multifactorLastModified) { this.multifactorLastModified = multifactorLastModified; return this; } - public Builder multifactorLastModified(UserDateSchema multifactorLastModified) { + public Builder multifactorLastModified(OffsetDateTime multifactorLastModified) { this.multifactorLastModified = Optional.ofNullable(multifactorLastModified); return this; } @@ -660,24 +685,30 @@ public Builder lastIp(String lastIp) { return this; } + /** + *

Last date and time this user logged in.

+ */ @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { + public Builder lastLogin(Optional lastLogin) { this.lastLogin = lastLogin; return this; } - public Builder lastLogin(UserDateSchema lastLogin) { + public Builder lastLogin(OffsetDateTime lastLogin) { this.lastLogin = Optional.ofNullable(lastLogin); return this; } + /** + *

Last date and time this user had their password reset.

+ */ @JsonSetter(value = "last_password_reset", nulls = Nulls.SKIP) - public Builder lastPasswordReset(Optional lastPasswordReset) { + public Builder lastPasswordReset(Optional lastPasswordReset) { this.lastPasswordReset = lastPasswordReset; return this; } - public Builder lastPasswordReset(UserDateSchema lastPasswordReset) { + public Builder lastPasswordReset(OffsetDateTime lastPasswordReset) { this.lastPasswordReset = Optional.ofNullable(lastPasswordReset); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java index 6712777dd..43ab0f827 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.types.ConnectedAccount; @@ -142,6 +143,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java index 95940f6c1..1a914d655 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java @@ -12,6 +12,7 @@ import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.types.ListUserOrganizationsOffsetPaginatedResponseContent; @@ -139,6 +140,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java index 2dfb76215..95e0a5bda 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java @@ -249,6 +249,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -343,6 +348,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java index fe2a11679..ad6652d14 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java @@ -251,6 +251,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -341,6 +346,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java index 1ae0c25e8..26e6724b8 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.types.ConnectedAccount; @@ -120,6 +121,9 @@ public ManagementApiHttpResponse> list( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java index af8879623..e85f553ae 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java @@ -12,6 +12,7 @@ import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.types.ListUserOrganizationsOffsetPaginatedResponseContent; @@ -115,6 +116,9 @@ public ManagementApiHttpResponse> list( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java index 3ecfaa25d..f6683d0ba 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java @@ -200,6 +200,9 @@ public ManagementApiHttpResponse create( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -272,6 +275,9 @@ public ManagementApiHttpResponse delete( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java index f83d44699..24333f89a 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java @@ -203,6 +203,9 @@ public ManagementApiHttpResponse assign( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -274,6 +277,9 @@ public ManagementApiHttpResponse delete( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java index e232ddfe7..52013d70e 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java @@ -61,6 +61,9 @@ public Optional getConnectionId() { return connectionId; } + /** + * @return user_id of the secondary user account being linked. + */ @JsonProperty("user_id") public Optional getUserId() { return userId; @@ -157,6 +160,9 @@ public Builder connectionId(String connectionId) { return this; } + /** + *

user_id of the secondary user account being linked.

+ */ @JsonSetter(value = "user_id", nulls = Nulls.SKIP) public Builder userId(Optional userId) { this.userId = userId; diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionPhoneProviderProtectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionPhoneProviderProtectionWireTest.java new file mode 100644 index 000000000..75ebe3f0b --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionPhoneProviderProtectionWireTest.java @@ -0,0 +1,189 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.GetPhoneProviderProtectionResponseContent; +import com.auth0.client.mgmt.types.PatchPhoneProviderProtectionResponseContent; +import com.auth0.client.mgmt.types.PhoneProviderProtectionBackoffStrategyEnum; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import okhttp3.mockwebserver.RecordedRequest; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class AttackProtectionPhoneProviderProtectionWireTest { + private MockWebServer server; + private ManagementApi client; + private ObjectMapper objectMapper = ObjectMappers.JSON_MAPPER; + + @BeforeEach + public void setup() throws Exception { + server = new MockWebServer(); + server.start(); + client = ManagementApi.builder() + .url(server.url("/").toString()) + .token("test-token") + .build(); + } + + @AfterEach + public void teardown() throws Exception { + server.shutdown(); + } + + @Test + public void testGet() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"type\":\"exponential\"}")); + GetPhoneProviderProtectionResponseContent response = + client.attackProtection().phoneProviderProtection().get(); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + "{\n" + " \"type\": \"exponential\"\n" + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + + @Test + public void testPatch() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"type\":\"exponential\"}")); + PatchPhoneProviderProtectionResponseContent response = client.attackProtection() + .phoneProviderProtection() + .patch(PatchPhoneProviderProtectionRequestContent.builder() + .type(PhoneProviderProtectionBackoffStrategyEnum.EXPONENTIAL) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"type\": \"exponential\"\n" + "}"; + JsonNode actualJson = objectMapper.readTree(actualRequestBody); + JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); + Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); + if (actualJson.has("type") || actualJson.has("_type") || actualJson.has("kind")) { + String discriminator = null; + if (actualJson.has("type")) discriminator = actualJson.get("type").asText(); + else if (actualJson.has("_type")) + discriminator = actualJson.get("_type").asText(); + else if (actualJson.has("kind")) + discriminator = actualJson.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualJson.isNull()) { + Assertions.assertTrue( + actualJson.isObject() || actualJson.isArray() || actualJson.isValueNode(), + "request should be a valid JSON value"); + } + + if (actualJson.isArray()) { + Assertions.assertTrue(actualJson.size() >= 0, "Array should have valid size"); + } + if (actualJson.isObject()) { + Assertions.assertTrue(actualJson.size() >= 0, "Object should have valid field count"); + } + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + "{\n" + " \"type\": \"exponential\"\n" + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + + /** + * Compares two JsonNodes with numeric equivalence and null safety. + * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. + * Allows 'actual' to have extra fields (e.g., default values added during serialization). + */ + private boolean jsonEquals(JsonNode expected, JsonNode actual) { + if (expected == null && actual == null) return true; + if (expected == null || actual == null) return false; + if (expected.equals(actual)) return true; + if (expected.isNumber() && actual.isNumber()) + return Math.abs(expected.doubleValue() - actual.doubleValue()) < 1e-10; + if (expected.isObject() && actual.isObject()) { + java.util.Iterator> iter = expected.fields(); + while (iter.hasNext()) { + java.util.Map.Entry entry = iter.next(); + JsonNode actualValue = actual.get(entry.getKey()); + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; + } + return true; + } + if (expected.isArray() && actual.isArray()) { + if (expected.size() != actual.size()) return false; + for (int i = 0; i < expected.size(); i++) { + if (!jsonEquals(expected.get(i), actual.get(i))) return false; + } + return true; + } + return false; + } +} diff --git a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java index 3dcee8001..db3475f69 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java @@ -43,7 +43,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true}}],\"next\":\"next\"}")); + "{\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true},\"cross_app_access_requesting_app\":{\"active\":true}}],\"next\":\"next\"}")); SyncPagingIterable response = client.clients() .connections() .get( diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java index dbeecfa03..3a5ca65b9 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java @@ -50,7 +50,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"next\":\"next\",\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true}}]}")); + "{\"next\":\"next\",\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true},\"cross_app_access_requesting_app\":{\"active\":true}}]}")); SyncPagingIterable response = client.connections() .list(ListConnectionsQueryParameters.builder() .from(OptionalNullable.of("from")) @@ -76,7 +76,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true}}")); + "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true},\"cross_app_access_requesting_app\":{\"active\":true}}")); CreateConnectionResponseContent response = client.connections() .create(CreateConnectionRequestContent.builder() .name("name") @@ -144,6 +144,9 @@ else if (actualJson.has("kind")) + " \"connected_accounts\": {\n" + " \"active\": true,\n" + " \"cross_app_access\": true\n" + + " },\n" + + " \"cross_app_access_requesting_app\": {\n" + + " \"active\": true\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -183,7 +186,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true}}")); + "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true},\"cross_app_access_requesting_app\":{\"active\":true}}")); GetConnectionResponseContent response = client.connections() .get( "id", @@ -224,6 +227,9 @@ public void testGet() throws Exception { + " \"connected_accounts\": {\n" + " \"active\": true,\n" + " \"cross_app_access\": true\n" + + " },\n" + + " \"cross_app_access_requesting_app\": {\n" + + " \"active\": true\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -272,7 +278,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true}}")); + "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true},\"cross_app_access_requesting_app\":{\"active\":true}}")); UpdateConnectionResponseContent response = client.connections() .update("id", UpdateConnectionRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -337,6 +343,9 @@ else if (actualJson.has("kind")) + " \"connected_accounts\": {\n" + " \"active\": true,\n" + " \"cross_app_access\": true\n" + + " },\n" + + " \"cross_app_access_requesting_app\": {\n" + + " \"active\": true\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java index 161dd86ec..3f3a5e2f7 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java @@ -52,7 +52,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"length\":1.1,\"total\":1.1,\"users\":[{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"multifactor_last_modified\",\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"last_password_reset\":\"last_password_reset\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"length\":1.1,\"total\":1.1,\"users\":[{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"2024-01-15T09:30:00Z\",\"last_ip\":\"last_ip\",\"last_login\":\"2024-01-15T09:30:00Z\",\"last_password_reset\":\"2024-01-15T09:30:00Z\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}]}")); SyncPagingIterable response = client.users() .list(ListUsersRequestParameters.builder() .page(OptionalNullable.of(1)) @@ -82,7 +82,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"multifactor_last_modified\",\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"last_password_reset\":\"last_password_reset\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); + "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"2024-01-15T09:30:00Z\",\"last_ip\":\"last_ip\",\"last_login\":\"2024-01-15T09:30:00Z\",\"last_password_reset\":\"2024-01-15T09:30:00Z\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); CreateUserResponseContent response = client.users() .create(CreateUserRequestContent.builder() .connection("connection") @@ -131,8 +131,8 @@ else if (actualJson.has("kind")) + " \"username\": \"username\",\n" + " \"phone_number\": \"phone_number\",\n" + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"identities\": [\n" + " {\n" + " \"connection\": \"connection\",\n" @@ -156,10 +156,10 @@ else if (actualJson.has("kind")) + " \"multifactor\": [\n" + " \"multifactor\"\n" + " ],\n" - + " \"multifactor_last_modified\": \"multifactor_last_modified\",\n" + + " \"multifactor_last_modified\": \"2024-01-15T09:30:00Z\",\n" + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"last_password_reset\": \"last_password_reset\",\n" + + " \"last_login\": \"2024-01-15T09:30:00Z\",\n" + + " \"last_password_reset\": \"2024-01-15T09:30:00Z\",\n" + " \"logins_count\": 1,\n" + " \"blocked\": true,\n" + " \"given_name\": \"given_name\",\n" @@ -202,7 +202,7 @@ public void testListUsersByEmail() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "[{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"multifactor_last_modified\",\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"last_password_reset\":\"last_password_reset\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}]")); + "[{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"2024-01-15T09:30:00Z\",\"last_ip\":\"last_ip\",\"last_login\":\"2024-01-15T09:30:00Z\",\"last_password_reset\":\"2024-01-15T09:30:00Z\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}]")); List response = client.users() .listUsersByEmail(ListUsersByEmailRequestParameters.builder() .email("email") @@ -225,8 +225,8 @@ public void testListUsersByEmail() throws Exception { + " \"username\": \"username\",\n" + " \"phone_number\": \"phone_number\",\n" + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"identities\": [\n" + " {}\n" + " ],\n" @@ -242,10 +242,10 @@ public void testListUsersByEmail() throws Exception { + " \"multifactor\": [\n" + " \"multifactor\"\n" + " ],\n" - + " \"multifactor_last_modified\": \"multifactor_last_modified\",\n" + + " \"multifactor_last_modified\": \"2024-01-15T09:30:00Z\",\n" + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"last_password_reset\": \"last_password_reset\",\n" + + " \"last_login\": \"2024-01-15T09:30:00Z\",\n" + + " \"last_password_reset\": \"2024-01-15T09:30:00Z\",\n" + " \"logins_count\": 1,\n" + " \"blocked\": true,\n" + " \"given_name\": \"given_name\",\n" @@ -289,7 +289,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"multifactor_last_modified\",\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"last_password_reset\":\"last_password_reset\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); + "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"2024-01-15T09:30:00Z\",\"last_ip\":\"last_ip\",\"last_login\":\"2024-01-15T09:30:00Z\",\"last_password_reset\":\"2024-01-15T09:30:00Z\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); GetUserResponseContent response = client.users() .get( "id", @@ -312,8 +312,8 @@ public void testGet() throws Exception { + " \"username\": \"username\",\n" + " \"phone_number\": \"phone_number\",\n" + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"identities\": [\n" + " {\n" + " \"connection\": \"connection\",\n" @@ -337,10 +337,10 @@ public void testGet() throws Exception { + " \"multifactor\": [\n" + " \"multifactor\"\n" + " ],\n" - + " \"multifactor_last_modified\": \"multifactor_last_modified\",\n" + + " \"multifactor_last_modified\": \"2024-01-15T09:30:00Z\",\n" + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"last_password_reset\": \"last_password_reset\",\n" + + " \"last_login\": \"2024-01-15T09:30:00Z\",\n" + + " \"last_password_reset\": \"2024-01-15T09:30:00Z\",\n" + " \"logins_count\": 1,\n" + " \"blocked\": true,\n" + " \"given_name\": \"given_name\",\n" @@ -392,7 +392,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"multifactor_last_modified\",\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"last_password_reset\":\"last_password_reset\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); + "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"2024-01-15T09:30:00Z\",\"last_ip\":\"last_ip\",\"last_login\":\"2024-01-15T09:30:00Z\",\"last_password_reset\":\"2024-01-15T09:30:00Z\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); UpdateUserResponseContent response = client.users().update("id", UpdateUserRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -439,8 +439,8 @@ else if (actualJson.has("kind")) + " \"username\": \"username\",\n" + " \"phone_number\": \"phone_number\",\n" + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"identities\": [\n" + " {\n" + " \"connection\": \"connection\",\n" @@ -464,10 +464,10 @@ else if (actualJson.has("kind")) + " \"multifactor\": [\n" + " \"multifactor\"\n" + " ],\n" - + " \"multifactor_last_modified\": \"multifactor_last_modified\",\n" + + " \"multifactor_last_modified\": \"2024-01-15T09:30:00Z\",\n" + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"last_password_reset\": \"last_password_reset\",\n" + + " \"last_login\": \"2024-01-15T09:30:00Z\",\n" + + " \"last_password_reset\": \"2024-01-15T09:30:00Z\",\n" + " \"logins_count\": 1,\n" + " \"blocked\": true,\n" + " \"given_name\": \"given_name\",\n" diff --git a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json index 7c99059c7..e2eb8eb2a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json @@ -255,6 +255,22 @@ } }, "initiate_login_uri": "initiate_login_uri", + "native_social_login": { + "apple": { + "enabled": true + }, + "facebook": { + "enabled": true + }, + "google": { + "enabled": true + } + }, + "fedcm_login": { + "google": { + "is_enabled": true + } + }, "refresh_token": { "rotation_type": "rotating", "expiration_type": "expiring", @@ -316,6 +332,16 @@ } ] }, + "token_vault_privileged_access": { + "credentials": [ + { + "id": "id" + } + ], + "ip_allowlist": [ + "ip_allowlist" + ] + }, "compliance_level": "none", "skip_non_verifiable_callback_uri_confirmation_prompt": true, "token_exchange": { diff --git a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json index 7c99059c7..e2eb8eb2a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json @@ -255,6 +255,22 @@ } }, "initiate_login_uri": "initiate_login_uri", + "native_social_login": { + "apple": { + "enabled": true + }, + "facebook": { + "enabled": true + }, + "google": { + "enabled": true + } + }, + "fedcm_login": { + "google": { + "is_enabled": true + } + }, "refresh_token": { "rotation_type": "rotating", "expiration_type": "expiring", @@ -316,6 +332,16 @@ } ] }, + "token_vault_privileged_access": { + "credentials": [ + { + "id": "id" + } + ], + "ip_allowlist": [ + "ip_allowlist" + ] + }, "compliance_level": "none", "skip_non_verifiable_callback_uri_confirmation_prompt": true, "token_exchange": { diff --git a/src/test/resources/wire-tests/ClientsWireTest_testList_response.json b/src/test/resources/wire-tests/ClientsWireTest_testList_response.json index 035c9d56b..e1320f403 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testList_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testList_response.json @@ -69,6 +69,13 @@ ], "require_pushed_authorization_requests": true, "require_proof_of_possession": true, + "token_vault_privileged_access": { + "credentials": [ + { + "id": "id" + } + ] + }, "compliance_level": "none", "skip_non_verifiable_callback_uri_confirmation_prompt": true, "par_request_expiry": 1, diff --git a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json index 7c99059c7..e2eb8eb2a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json @@ -255,6 +255,22 @@ } }, "initiate_login_uri": "initiate_login_uri", + "native_social_login": { + "apple": { + "enabled": true + }, + "facebook": { + "enabled": true + }, + "google": { + "enabled": true + } + }, + "fedcm_login": { + "google": { + "is_enabled": true + } + }, "refresh_token": { "rotation_type": "rotating", "expiration_type": "expiring", @@ -316,6 +332,16 @@ } ] }, + "token_vault_privileged_access": { + "credentials": [ + { + "id": "id" + } + ], + "ip_allowlist": [ + "ip_allowlist" + ] + }, "compliance_level": "none", "skip_non_verifiable_callback_uri_confirmation_prompt": true, "token_exchange": { diff --git a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json index 7c99059c7..e2eb8eb2a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json @@ -255,6 +255,22 @@ } }, "initiate_login_uri": "initiate_login_uri", + "native_social_login": { + "apple": { + "enabled": true + }, + "facebook": { + "enabled": true + }, + "google": { + "enabled": true + } + }, + "fedcm_login": { + "google": { + "is_enabled": true + } + }, "refresh_token": { "rotation_type": "rotating", "expiration_type": "expiring", @@ -316,6 +332,16 @@ } ] }, + "token_vault_privileged_access": { + "credentials": [ + { + "id": "id" + } + ], + "ip_allowlist": [ + "ip_allowlist" + ] + }, "compliance_level": "none", "skip_non_verifiable_callback_uri_confirmation_prompt": true, "token_exchange": {