From ef221ad3fd373080d560a7382a4f35c40e1df3dd Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Fri, 27 Sep 2024 10:31:37 -0600 Subject: [PATCH 01/11] Savant 2.0.0 plugins --- build.savant | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.savant b/build.savant index b8dbe0bb..43a820a0 100644 --- a/build.savant +++ b/build.savant @@ -58,13 +58,13 @@ project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.54.0 } // Plugins -dependency = loadPlugin(id: "org.savantbuild.plugin:dependency:2.0.0-RC.7") -java = loadPlugin(id: "org.savantbuild.plugin:java:2.0.0-RC.6") -javaTestNG = loadPlugin(id: "org.savantbuild.plugin:java-testng:2.0.0-RC.6") -file = loadPlugin(id: "org.savantbuild.plugin:file:2.0.0-RC.7") -idea = loadPlugin(id: "org.savantbuild.plugin:idea:2.0.0-RC.7") -pom = loadPlugin(id: "org.savantbuild.plugin:pom:2.0.0-RC.6") -release = loadPlugin(id: "org.savantbuild.plugin:release-git:2.0.0-RC.6") +dependency = loadPlugin(id: "org.savantbuild.plugin:dependency:2.0.0") +java = loadPlugin(id: "org.savantbuild.plugin:java:2.0.0") +javaTestNG = loadPlugin(id: "org.savantbuild.plugin:java-testng:2.0.0") +file = loadPlugin(id: "org.savantbuild.plugin:file:2.0.0") +idea = loadPlugin(id: "org.savantbuild.plugin:idea:2.0.0") +pom = loadPlugin(id: "org.savantbuild.plugin:pom:2.0.0") +release = loadPlugin(id: "org.savantbuild.plugin:release-git:2.0.0") // Plugin settings java.settings.javaVersion = "1.8" From ffedec02962cf747494833ba0b62dd6225e7a9af Mon Sep 17 00:00:00 2001 From: Brent Halsey Date: Tue, 1 Oct 2024 11:24:10 -0600 Subject: [PATCH 02/11] UsageDataConfiguration in the correct package --- src/main/java/io/fusionauth/domain/SystemConfiguration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/fusionauth/domain/SystemConfiguration.java b/src/main/java/io/fusionauth/domain/SystemConfiguration.java index a07965c5..e7def627 100644 --- a/src/main/java/io/fusionauth/domain/SystemConfiguration.java +++ b/src/main/java/io/fusionauth/domain/SystemConfiguration.java @@ -54,6 +54,8 @@ public class SystemConfiguration implements Buildable { public UIConfiguration uiConfiguration = new UIConfiguration(); + public UsageDataConfiguration usageDataConfiguration = new UsageDataConfiguration(); + public WebhookEventLogConfiguration webhookEventLogConfiguration = new WebhookEventLogConfiguration(); @JacksonConstructor @@ -74,6 +76,7 @@ public SystemConfiguration(SystemConfiguration other) { this.reportTimezone = other.reportTimezone; this.trustedProxyConfiguration = new SystemTrustedProxyConfiguration(other.trustedProxyConfiguration); this.uiConfiguration = new UIConfiguration(other.uiConfiguration); + this.usageDataConfiguration = new UsageDataConfiguration(other.usageDataConfiguration); this.webhookEventLogConfiguration = new WebhookEventLogConfiguration(other.webhookEventLogConfiguration); } @@ -97,12 +100,13 @@ public boolean equals(Object o) { Objects.equals(trustedProxyConfiguration, that.trustedProxyConfiguration) && Objects.equals(reportTimezone, that.reportTimezone) && Objects.equals(uiConfiguration, that.uiConfiguration) && + Objects.equals(usageDataConfiguration, that.usageDataConfiguration) && Objects.equals(webhookEventLogConfiguration, that.webhookEventLogConfiguration); } @Override public int hashCode() { - return Objects.hash(auditLogConfiguration, cookieEncryptionKey, corsConfiguration, data, eventLogConfiguration, insertInstant, lastUpdateInstant, loginRecordConfiguration, reportTimezone, trustedProxyConfiguration, uiConfiguration, webhookEventLogConfiguration); + return Objects.hash(auditLogConfiguration, cookieEncryptionKey, corsConfiguration, data, eventLogConfiguration, insertInstant, lastUpdateInstant, loginRecordConfiguration, reportTimezone, trustedProxyConfiguration, uiConfiguration, usageDataConfiguration, webhookEventLogConfiguration); } public void normalize() { From 488695a1a761884472d882e0672e29ed504e3b90 Mon Sep 17 00:00:00 2001 From: Brent Halsey Date: Tue, 1 Oct 2024 12:54:21 -0600 Subject: [PATCH 03/11] pickup untracked files --- .../domain/UsageDataConfiguration.java | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/main/java/io/fusionauth/domain/UsageDataConfiguration.java diff --git a/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java b/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java new file mode 100644 index 00000000..536d861a --- /dev/null +++ b/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024-2024, FusionAuth, All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + */ +package io.fusionauth.domain; + +import java.util.Objects; + +import com.inversoft.json.JacksonConstructor; + +/** + * Config for Usage Data / Stats + * + * @author Lyle Schemmerling + */ +public class UsageDataConfiguration extends Enableable { + public int numberOfDaysToRetain = 366; + + @JacksonConstructor + public UsageDataConfiguration() { + } + + public UsageDataConfiguration(UsageDataConfiguration other) { + this.enabled = other.enabled; + this.numberOfDaysToRetain = other.numberOfDaysToRetain; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + if (!super.equals(o)) { + return false; + } + UsageDataConfiguration that = (UsageDataConfiguration) o; + return numberOfDaysToRetain == that.numberOfDaysToRetain; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), numberOfDaysToRetain); + } +} From 44cce26e0c5d904fc67a35010d9a768173d63f85 Mon Sep 17 00:00:00 2001 From: Brent Halsey Date: Wed, 9 Oct 2024 11:54:10 -0600 Subject: [PATCH 04/11] fix copyright --- src/main/java/io/fusionauth/domain/UsageDataConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java b/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java index 536d861a..73fe3b94 100644 --- a/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java +++ b/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024-2024, FusionAuth, All Rights Reserved + * Copyright (c) 2024, FusionAuth, All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From f4be6d12db792133ae9dc010ed89eb482ff57c38 Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Wed, 16 Oct 2024 23:31:33 -0600 Subject: [PATCH 05/11] Domain sync --- .../domain/SystemConfiguration.java | 6 +- .../domain/UsageDataConfiguration.java | 58 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 src/main/java/io/fusionauth/domain/UsageDataConfiguration.java diff --git a/src/main/java/io/fusionauth/domain/SystemConfiguration.java b/src/main/java/io/fusionauth/domain/SystemConfiguration.java index a07965c5..e7def627 100644 --- a/src/main/java/io/fusionauth/domain/SystemConfiguration.java +++ b/src/main/java/io/fusionauth/domain/SystemConfiguration.java @@ -54,6 +54,8 @@ public class SystemConfiguration implements Buildable { public UIConfiguration uiConfiguration = new UIConfiguration(); + public UsageDataConfiguration usageDataConfiguration = new UsageDataConfiguration(); + public WebhookEventLogConfiguration webhookEventLogConfiguration = new WebhookEventLogConfiguration(); @JacksonConstructor @@ -74,6 +76,7 @@ public SystemConfiguration(SystemConfiguration other) { this.reportTimezone = other.reportTimezone; this.trustedProxyConfiguration = new SystemTrustedProxyConfiguration(other.trustedProxyConfiguration); this.uiConfiguration = new UIConfiguration(other.uiConfiguration); + this.usageDataConfiguration = new UsageDataConfiguration(other.usageDataConfiguration); this.webhookEventLogConfiguration = new WebhookEventLogConfiguration(other.webhookEventLogConfiguration); } @@ -97,12 +100,13 @@ public boolean equals(Object o) { Objects.equals(trustedProxyConfiguration, that.trustedProxyConfiguration) && Objects.equals(reportTimezone, that.reportTimezone) && Objects.equals(uiConfiguration, that.uiConfiguration) && + Objects.equals(usageDataConfiguration, that.usageDataConfiguration) && Objects.equals(webhookEventLogConfiguration, that.webhookEventLogConfiguration); } @Override public int hashCode() { - return Objects.hash(auditLogConfiguration, cookieEncryptionKey, corsConfiguration, data, eventLogConfiguration, insertInstant, lastUpdateInstant, loginRecordConfiguration, reportTimezone, trustedProxyConfiguration, uiConfiguration, webhookEventLogConfiguration); + return Objects.hash(auditLogConfiguration, cookieEncryptionKey, corsConfiguration, data, eventLogConfiguration, insertInstant, lastUpdateInstant, loginRecordConfiguration, reportTimezone, trustedProxyConfiguration, uiConfiguration, usageDataConfiguration, webhookEventLogConfiguration); } public void normalize() { diff --git a/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java b/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java new file mode 100644 index 00000000..73fe3b94 --- /dev/null +++ b/src/main/java/io/fusionauth/domain/UsageDataConfiguration.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024, FusionAuth, All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + */ +package io.fusionauth.domain; + +import java.util.Objects; + +import com.inversoft.json.JacksonConstructor; + +/** + * Config for Usage Data / Stats + * + * @author Lyle Schemmerling + */ +public class UsageDataConfiguration extends Enableable { + public int numberOfDaysToRetain = 366; + + @JacksonConstructor + public UsageDataConfiguration() { + } + + public UsageDataConfiguration(UsageDataConfiguration other) { + this.enabled = other.enabled; + this.numberOfDaysToRetain = other.numberOfDaysToRetain; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + if (!super.equals(o)) { + return false; + } + UsageDataConfiguration that = (UsageDataConfiguration) o; + return numberOfDaysToRetain == that.numberOfDaysToRetain; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), numberOfDaysToRetain); + } +} From fa4ea54c29fa9a042c4c22367f8b357baf34096a Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Tue, 3 Dec 2024 15:44:08 -0800 Subject: [PATCH 06/11] Updated version for fusionauth-java-client to 1.55.0 --- build.savant | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index 43a820a0..d4e1b008 100644 --- a/build.savant +++ b/build.savant @@ -21,7 +21,7 @@ javaErrorVersion = "2.2.3" restifyVersion = "4.2.1" testngVersion = "7.5.1" -project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.54.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.55.0", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/pom.xml b/pom.xml index 3a60db50..5899fd8b 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ io.fusionauth fusionauth-java-client - 1.54.0 + 1.55.0 jar FusionAuth Java Client Library From 11cd13e76cebbd46ef472849988be3f2586a5f7e Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Tue, 3 Dec 2024 15:50:35 -0800 Subject: [PATCH 07/11] domain sync --- .../io/fusionauth/domain/api/user/RegistrationResponse.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/io/fusionauth/domain/api/user/RegistrationResponse.java b/src/main/java/io/fusionauth/domain/api/user/RegistrationResponse.java index fe8207c5..da1a87bb 100644 --- a/src/main/java/io/fusionauth/domain/api/user/RegistrationResponse.java +++ b/src/main/java/io/fusionauth/domain/api/user/RegistrationResponse.java @@ -16,6 +16,7 @@ package io.fusionauth.domain.api.user; import java.time.ZonedDateTime; +import java.util.UUID; import com.inversoft.json.JacksonConstructor; import io.fusionauth.domain.User; @@ -29,6 +30,8 @@ public class RegistrationResponse { public String refreshToken; + public UUID refreshTokenId; + public UserRegistration registration; public String registrationVerificationId; From 96b13c49085cd115aa903fc86c31573585dbbf4b Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Tue, 10 Dec 2024 17:24:23 -0700 Subject: [PATCH 08/11] java-client sync --- .../io/fusionauth/domain/search/GroupMemberSearchCriteria.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/fusionauth/domain/search/GroupMemberSearchCriteria.java b/src/main/java/io/fusionauth/domain/search/GroupMemberSearchCriteria.java index 09fd557c..3addc3d8 100644 --- a/src/main/java/io/fusionauth/domain/search/GroupMemberSearchCriteria.java +++ b/src/main/java/io/fusionauth/domain/search/GroupMemberSearchCriteria.java @@ -20,6 +20,7 @@ import java.util.Set; import java.util.UUID; +import io.fusionauth.domain.Buildable; import static io.fusionauth.domain.util.SQLTools.normalizeOrderBy; /** @@ -27,7 +28,7 @@ * * @author Daniel DeGroff */ -public class GroupMemberSearchCriteria extends BaseSearchCriteria { +public class GroupMemberSearchCriteria extends BaseSearchCriteria implements Buildable { public static final Map SortableFields = new LinkedHashMap<>(); public UUID groupId; From b9238f4b5a4dca80871a270ee35bed3924ed6a56 Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Fri, 20 Dec 2024 12:34:50 -0700 Subject: [PATCH 09/11] domain sync --- src/main/java/io/fusionauth/domain/WebhookEventResult.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/fusionauth/domain/WebhookEventResult.java b/src/main/java/io/fusionauth/domain/WebhookEventResult.java index 4a2054d7..0fcb081a 100644 --- a/src/main/java/io/fusionauth/domain/WebhookEventResult.java +++ b/src/main/java/io/fusionauth/domain/WebhookEventResult.java @@ -33,9 +33,9 @@ public enum WebhookEventResult { * @return Return all available results in displayable order. */ public static List allResults() { - return Arrays.asList(WebhookEventResult.Failed, + return Arrays.asList(WebhookEventResult.Succeeded, WebhookEventResult.Running, - WebhookEventResult.Succeeded); + WebhookEventResult.Failed); } } From 56631ec811827a7d957f408e1de1ae2c35b4129f Mon Sep 17 00:00:00 2001 From: Brent Halsey Date: Fri, 20 Dec 2024 16:03:22 -0700 Subject: [PATCH 10/11] 1.55.0 builders --- .../java/io/fusionauth/domain/APIKey.java | 7 +++++-- .../fusionauth/domain/JWTConfiguration.java | 7 ++++++- .../domain/RefreshTokenRevocationPolicy.java | 9 +++++--- .../fusionauth/domain/jwt/RefreshToken.java | 4 ++-- .../provider/BaseSAMLv2IdentityProvider.java | 21 ++++++++++++++++--- 5 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/main/java/io/fusionauth/domain/APIKey.java b/src/main/java/io/fusionauth/domain/APIKey.java index 05db7e3b..24a87a65 100644 --- a/src/main/java/io/fusionauth/domain/APIKey.java +++ b/src/main/java/io/fusionauth/domain/APIKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, FusionAuth, All Rights Reserved + * Copyright (c) 2021-2024, FusionAuth, All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,8 @@ * @author sanjay */ public class APIKey implements Buildable { + public ZonedDateTime expirationInstant; + public UUID id; public ZonedDateTime insertInstant; @@ -68,6 +70,7 @@ public boolean equals(Object o) { } APIKey apiKey = (APIKey) o; return keyManager == apiKey.keyManager && + Objects.equals(expirationInstant, apiKey.expirationInstant) && Objects.equals(id, apiKey.id) && Objects.equals(insertInstant, apiKey.insertInstant) && Objects.equals(ipAccessControlListId, apiKey.ipAccessControlListId) && @@ -80,7 +83,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, insertInstant, ipAccessControlListId, key, keyManager, lastUpdateInstant, metaData, permissions, tenantId); + return Objects.hash(expirationInstant, id, insertInstant, ipAccessControlListId, key, keyManager, lastUpdateInstant, metaData, permissions, tenantId); } public void normalize() { diff --git a/src/main/java/io/fusionauth/domain/JWTConfiguration.java b/src/main/java/io/fusionauth/domain/JWTConfiguration.java index 3227928d..00634fa7 100644 --- a/src/main/java/io/fusionauth/domain/JWTConfiguration.java +++ b/src/main/java/io/fusionauth/domain/JWTConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, FusionAuth, All Rights Reserved + * Copyright (c) 2019-2024, FusionAuth, All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,8 @@ public class JWTConfiguration extends Enableable implements Buildable extends BaseIdentityProvider { + public SAMLv2AssertionDecryptionConfiguration assertionDecryptionConfiguration = new SAMLv2AssertionDecryptionConfiguration(); + public String emailClaim; /** @@ -36,15 +50,16 @@ public boolean equals(Object o) { return false; } BaseSAMLv2IdentityProvider that = (BaseSAMLv2IdentityProvider) o; - return useNameIdForEmail == that.useNameIdForEmail + return Objects.equals(assertionDecryptionConfiguration, that.assertionDecryptionConfiguration) && Objects.equals(emailClaim, that.emailClaim) && Objects.equals(keyId, that.keyId) && Objects.equals(uniqueIdClaim, that.uniqueIdClaim) + && useNameIdForEmail == that.useNameIdForEmail && Objects.equals(usernameClaim, that.usernameClaim); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), emailClaim, keyId, uniqueIdClaim, useNameIdForEmail, usernameClaim); + return Objects.hash(super.hashCode(), assertionDecryptionConfiguration, emailClaim, keyId, uniqueIdClaim, useNameIdForEmail, usernameClaim); } } From 9302693aacfcad96423caafba2f430c7a7e3e0d0 Mon Sep 17 00:00:00 2001 From: Brent Halsey Date: Fri, 20 Dec 2024 16:05:22 -0700 Subject: [PATCH 11/11] 1.55.0 builders --- .../RefreshTokenOneTimeUseConfiguration.java | 61 +++++++++++++++++++ ...AMLv2AssertionDecryptionConfiguration.java | 56 +++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 src/main/java/io/fusionauth/domain/RefreshTokenOneTimeUseConfiguration.java create mode 100644 src/main/java/io/fusionauth/domain/provider/SAMLv2AssertionDecryptionConfiguration.java diff --git a/src/main/java/io/fusionauth/domain/RefreshTokenOneTimeUseConfiguration.java b/src/main/java/io/fusionauth/domain/RefreshTokenOneTimeUseConfiguration.java new file mode 100644 index 00000000..737c38f9 --- /dev/null +++ b/src/main/java/io/fusionauth/domain/RefreshTokenOneTimeUseConfiguration.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2024, FusionAuth, All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + */ +package io.fusionauth.domain; + +import java.util.Objects; + +import com.inversoft.json.JacksonConstructor; +import com.inversoft.json.ToString; + +/** + * Refresh token one-time use configuration. This configuration is utilized when the usage policy is + * configured for one-time use. + * + * @author Daniel DeGroff + */ +public class RefreshTokenOneTimeUseConfiguration implements Buildable { + public int gracePeriodInSeconds; + + @JacksonConstructor + public RefreshTokenOneTimeUseConfiguration() { + } + + public RefreshTokenOneTimeUseConfiguration(RefreshTokenOneTimeUseConfiguration other) { + this.gracePeriodInSeconds = other.gracePeriodInSeconds; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshTokenOneTimeUseConfiguration that = (RefreshTokenOneTimeUseConfiguration) o; + return gracePeriodInSeconds == that.gracePeriodInSeconds; + } + + @Override + public int hashCode() { + return Objects.hash(gracePeriodInSeconds); + } + + @Override + public String toString() { + return ToString.toString(this); + } +} diff --git a/src/main/java/io/fusionauth/domain/provider/SAMLv2AssertionDecryptionConfiguration.java b/src/main/java/io/fusionauth/domain/provider/SAMLv2AssertionDecryptionConfiguration.java new file mode 100644 index 00000000..6b6ea34d --- /dev/null +++ b/src/main/java/io/fusionauth/domain/provider/SAMLv2AssertionDecryptionConfiguration.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024, FusionAuth, All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + */ +package io.fusionauth.domain.provider; + +import java.util.Objects; +import java.util.UUID; + +import com.inversoft.json.ToString; +import io.fusionauth.domain.Enableable; + +/** + * Configuration for encrypted assertions when acting as SAML Service Provider + * + * @author Jaret Hendrickson + */ +public class SAMLv2AssertionDecryptionConfiguration extends Enableable { + public UUID keyTransportDecryptionKeyId; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SAMLv2AssertionDecryptionConfiguration)) { + return false; + } + if (!super.equals(o)) { + return false; + } + SAMLv2AssertionDecryptionConfiguration that = (SAMLv2AssertionDecryptionConfiguration) o; + return Objects.equals(keyTransportDecryptionKeyId, that.keyTransportDecryptionKeyId); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), keyTransportDecryptionKeyId); + } + + @Override + public String toString() { + return ToString.toString(this); + } +}