Skip to content

Commit ada9683

Browse files
authored
Merge pull request #47 from FusionAuth/releases/1.55.0
Merge releases/1.55.0
2 parents d5a0062 + b0cbbdd commit ada9683

13 files changed

+224
-16
lines changed

build.savant

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ javaErrorVersion = "2.2.3"
2121
restifyVersion = "4.2.1"
2222
testngVersion = "7.5.1"
2323

24-
project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.54.0", licenses: ["ApacheV2_0"]) {
24+
project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.55.0", licenses: ["ApacheV2_0"]) {
2525
workflow {
2626
fetch {
2727
cache()

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<groupId>io.fusionauth</groupId>
1919
<artifactId>fusionauth-java-client</artifactId>
20-
<version>1.54.0</version>
20+
<version>1.55.0</version>
2121
<packaging>jar</packaging>
2222

2323
<name>FusionAuth Java Client Library</name>

src/main/java/io/fusionauth/domain/APIKey.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2021-2024, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,6 +32,8 @@
3232
* @author sanjay
3333
*/
3434
public class APIKey implements Buildable<APIKey> {
35+
public ZonedDateTime expirationInstant;
36+
3537
public UUID id;
3638

3739
public ZonedDateTime insertInstant;
@@ -68,6 +70,7 @@ public boolean equals(Object o) {
6870
}
6971
APIKey apiKey = (APIKey) o;
7072
return keyManager == apiKey.keyManager &&
73+
Objects.equals(expirationInstant, apiKey.expirationInstant) &&
7174
Objects.equals(id, apiKey.id) &&
7275
Objects.equals(insertInstant, apiKey.insertInstant) &&
7376
Objects.equals(ipAccessControlListId, apiKey.ipAccessControlListId) &&
@@ -80,7 +83,7 @@ public boolean equals(Object o) {
8083

8184
@Override
8285
public int hashCode() {
83-
return Objects.hash(id, insertInstant, ipAccessControlListId, key, keyManager, lastUpdateInstant, metaData, permissions, tenantId);
86+
return Objects.hash(expirationInstant, id, insertInstant, ipAccessControlListId, key, keyManager, lastUpdateInstant, metaData, permissions, tenantId);
8487
}
8588

8689
public void normalize() {

src/main/java/io/fusionauth/domain/JWTConfiguration.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-2024, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,6 +40,8 @@ public class JWTConfiguration extends Enableable implements Buildable<JWTConfigu
4040

4141
public RefreshTokenExpirationPolicy refreshTokenExpirationPolicy = RefreshTokenExpirationPolicy.Fixed;
4242

43+
public RefreshTokenOneTimeUseConfiguration refreshTokenOneTimeUseConfiguration = new RefreshTokenOneTimeUseConfiguration();
44+
4345
/**
4446
* This can only be set at the tenant level.
4547
*/
@@ -71,6 +73,7 @@ public JWTConfiguration(JWTConfiguration other) {
7173
this.idTokenKeyId = other.idTokenKeyId;
7274
this.refreshTokenExpirationPolicy = other.refreshTokenExpirationPolicy;
7375
this.refreshTokenRevocationPolicy = new RefreshTokenRevocationPolicy(other.refreshTokenRevocationPolicy);
76+
this.refreshTokenOneTimeUseConfiguration = new RefreshTokenOneTimeUseConfiguration(other.refreshTokenOneTimeUseConfiguration);
7477
this.refreshTokenSlidingWindowConfiguration = new RefreshTokenSlidingWindowConfiguration(other.refreshTokenSlidingWindowConfiguration);
7578
this.refreshTokenTimeToLiveInMinutes = other.refreshTokenTimeToLiveInMinutes;
7679
this.refreshTokenUsagePolicy = other.refreshTokenUsagePolicy;
@@ -93,6 +96,7 @@ public boolean equals(Object o) {
9396
Objects.equals(idTokenKeyId, that.idTokenKeyId) &&
9497
refreshTokenExpirationPolicy == that.refreshTokenExpirationPolicy &&
9598
Objects.equals(refreshTokenRevocationPolicy, that.refreshTokenRevocationPolicy) &&
99+
Objects.equals(refreshTokenOneTimeUseConfiguration, that.refreshTokenOneTimeUseConfiguration) &&
96100
Objects.equals(refreshTokenSlidingWindowConfiguration, that.refreshTokenSlidingWindowConfiguration) &&
97101
refreshTokenTimeToLiveInMinutes == that.refreshTokenTimeToLiveInMinutes &&
98102
refreshTokenUsagePolicy == that.refreshTokenUsagePolicy &&
@@ -106,6 +110,7 @@ public int hashCode() {
106110
idTokenKeyId,
107111
refreshTokenExpirationPolicy,
108112
refreshTokenRevocationPolicy,
113+
refreshTokenOneTimeUseConfiguration,
109114
refreshTokenSlidingWindowConfiguration,
110115
refreshTokenTimeToLiveInMinutes,
111116
refreshTokenUsagePolicy,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright (c) 2024, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
15+
*/
16+
package io.fusionauth.domain;
17+
18+
import java.util.Objects;
19+
20+
import com.inversoft.json.JacksonConstructor;
21+
import com.inversoft.json.ToString;
22+
23+
/**
24+
* Refresh token one-time use configuration. This configuration is utilized when the usage policy is
25+
* configured for one-time use.
26+
*
27+
* @author Daniel DeGroff
28+
*/
29+
public class RefreshTokenOneTimeUseConfiguration implements Buildable<RefreshTokenOneTimeUseConfiguration> {
30+
public int gracePeriodInSeconds;
31+
32+
@JacksonConstructor
33+
public RefreshTokenOneTimeUseConfiguration() {
34+
}
35+
36+
public RefreshTokenOneTimeUseConfiguration(RefreshTokenOneTimeUseConfiguration other) {
37+
this.gracePeriodInSeconds = other.gracePeriodInSeconds;
38+
}
39+
40+
@Override
41+
public boolean equals(Object o) {
42+
if (this == o) {
43+
return true;
44+
}
45+
if (o == null || getClass() != o.getClass()) {
46+
return false;
47+
}
48+
RefreshTokenOneTimeUseConfiguration that = (RefreshTokenOneTimeUseConfiguration) o;
49+
return gracePeriodInSeconds == that.gracePeriodInSeconds;
50+
}
51+
52+
@Override
53+
public int hashCode() {
54+
return Objects.hash(gracePeriodInSeconds);
55+
}
56+
57+
@Override
58+
public String toString() {
59+
return ToString.toString(this);
60+
}
61+
}

src/main/java/io/fusionauth/domain/RefreshTokenRevocationPolicy.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2020-2024, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,8 @@ public class RefreshTokenRevocationPolicy implements Buildable<RefreshTokenRevoc
2828

2929
public boolean onMultiFactorEnable;
3030

31+
public boolean onOneTimeTokenReuse;
32+
3133
public boolean onPasswordChanged;
3234

3335
@JacksonConstructor
@@ -38,6 +40,7 @@ public RefreshTokenRevocationPolicy(RefreshTokenRevocationPolicy other) {
3840
this.onLoginPrevented = other.onLoginPrevented;
3941
this.onMultiFactorEnable = other.onMultiFactorEnable;
4042
this.onPasswordChanged = other.onPasswordChanged;
43+
this.onOneTimeTokenReuse = other.onOneTimeTokenReuse;
4144
}
4245

4346
public RefreshTokenRevocationPolicy(boolean onLoginPrevented, boolean onPasswordChanged) {
@@ -54,12 +57,12 @@ public boolean equals(Object o) {
5457
return false;
5558
}
5659
RefreshTokenRevocationPolicy that = (RefreshTokenRevocationPolicy) o;
57-
return onLoginPrevented == that.onLoginPrevented && onMultiFactorEnable == that.onMultiFactorEnable && onPasswordChanged == that.onPasswordChanged;
60+
return onLoginPrevented == that.onLoginPrevented && onMultiFactorEnable == that.onMultiFactorEnable && onPasswordChanged == that.onPasswordChanged && onOneTimeTokenReuse == that.onOneTimeTokenReuse;
5861
}
5962

6063
@Override
6164
public int hashCode() {
62-
return Objects.hash(onLoginPrevented, onMultiFactorEnable, onPasswordChanged);
65+
return Objects.hash(onLoginPrevented, onMultiFactorEnable, onPasswordChanged, onOneTimeTokenReuse);
6366
}
6467

6568
@Override

src/main/java/io/fusionauth/domain/SystemConfiguration.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public class SystemConfiguration implements Buildable<SystemConfiguration> {
5454

5555
public UIConfiguration uiConfiguration = new UIConfiguration();
5656

57+
public UsageDataConfiguration usageDataConfiguration = new UsageDataConfiguration();
58+
5759
public WebhookEventLogConfiguration webhookEventLogConfiguration = new WebhookEventLogConfiguration();
5860

5961
@JacksonConstructor
@@ -74,6 +76,7 @@ public SystemConfiguration(SystemConfiguration other) {
7476
this.reportTimezone = other.reportTimezone;
7577
this.trustedProxyConfiguration = new SystemTrustedProxyConfiguration(other.trustedProxyConfiguration);
7678
this.uiConfiguration = new UIConfiguration(other.uiConfiguration);
79+
this.usageDataConfiguration = new UsageDataConfiguration(other.usageDataConfiguration);
7780
this.webhookEventLogConfiguration = new WebhookEventLogConfiguration(other.webhookEventLogConfiguration);
7881
}
7982

@@ -97,12 +100,13 @@ public boolean equals(Object o) {
97100
Objects.equals(trustedProxyConfiguration, that.trustedProxyConfiguration) &&
98101
Objects.equals(reportTimezone, that.reportTimezone) &&
99102
Objects.equals(uiConfiguration, that.uiConfiguration) &&
103+
Objects.equals(usageDataConfiguration, that.usageDataConfiguration) &&
100104
Objects.equals(webhookEventLogConfiguration, that.webhookEventLogConfiguration);
101105
}
102106

103107
@Override
104108
public int hashCode() {
105-
return Objects.hash(auditLogConfiguration, cookieEncryptionKey, corsConfiguration, data, eventLogConfiguration, insertInstant, lastUpdateInstant, loginRecordConfiguration, reportTimezone, trustedProxyConfiguration, uiConfiguration, webhookEventLogConfiguration);
109+
return Objects.hash(auditLogConfiguration, cookieEncryptionKey, corsConfiguration, data, eventLogConfiguration, insertInstant, lastUpdateInstant, loginRecordConfiguration, reportTimezone, trustedProxyConfiguration, uiConfiguration, usageDataConfiguration, webhookEventLogConfiguration);
106110
}
107111

108112
public void normalize() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (c) 2024, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
15+
*/
16+
package io.fusionauth.domain;
17+
18+
import java.util.Objects;
19+
20+
import com.inversoft.json.JacksonConstructor;
21+
22+
/**
23+
* Config for Usage Data / Stats
24+
*
25+
* @author Lyle Schemmerling
26+
*/
27+
public class UsageDataConfiguration extends Enableable {
28+
public int numberOfDaysToRetain = 366;
29+
30+
@JacksonConstructor
31+
public UsageDataConfiguration() {
32+
}
33+
34+
public UsageDataConfiguration(UsageDataConfiguration other) {
35+
this.enabled = other.enabled;
36+
this.numberOfDaysToRetain = other.numberOfDaysToRetain;
37+
}
38+
39+
@Override
40+
public boolean equals(Object o) {
41+
if (this == o) {
42+
return true;
43+
}
44+
if (o == null || getClass() != o.getClass()) {
45+
return false;
46+
}
47+
if (!super.equals(o)) {
48+
return false;
49+
}
50+
UsageDataConfiguration that = (UsageDataConfiguration) o;
51+
return numberOfDaysToRetain == that.numberOfDaysToRetain;
52+
}
53+
54+
@Override
55+
public int hashCode() {
56+
return Objects.hash(super.hashCode(), numberOfDaysToRetain);
57+
}
58+
}

src/main/java/io/fusionauth/domain/WebhookEventResult.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public enum WebhookEventResult {
3333
* @return Return all available results in displayable order.
3434
*/
3535
public static List<WebhookEventResult> allResults() {
36-
return Arrays.asList(WebhookEventResult.Failed,
36+
return Arrays.asList(WebhookEventResult.Succeeded,
3737
WebhookEventResult.Running,
38-
WebhookEventResult.Succeeded);
38+
WebhookEventResult.Failed);
3939

4040
}
4141
}

src/main/java/io/fusionauth/domain/api/user/RegistrationResponse.java

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package io.fusionauth.domain.api.user;
1717

1818
import java.time.ZonedDateTime;
19+
import java.util.UUID;
1920

2021
import com.inversoft.json.JacksonConstructor;
2122
import io.fusionauth.domain.User;
@@ -29,6 +30,8 @@
2930
public class RegistrationResponse {
3031
public String refreshToken;
3132

33+
public UUID refreshTokenId;
34+
3235
public UserRegistration registration;
3336

3437
public String registrationVerificationId;

src/main/java/io/fusionauth/domain/jwt/RefreshToken.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2018-2024, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -92,7 +92,7 @@ public boolean equals(Object o) {
9292
if (this == o) {
9393
return true;
9494
}
95-
if (o == null || getClass() != o.getClass()) {
95+
if (!(o instanceof RefreshToken)) {
9696
return false;
9797
}
9898
RefreshToken that = (RefreshToken) o;

src/main/java/io/fusionauth/domain/provider/BaseSAMLv2IdentityProvider.java

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2023-2024, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
315
*/
416
package io.fusionauth.domain.provider;
517

@@ -11,6 +23,8 @@
1123
* @author Lyle Schemmerling
1224
*/
1325
public abstract class BaseSAMLv2IdentityProvider<D extends BaseIdentityProviderApplicationConfiguration> extends BaseIdentityProvider<D> {
26+
public SAMLv2AssertionDecryptionConfiguration assertionDecryptionConfiguration = new SAMLv2AssertionDecryptionConfiguration();
27+
1428
public String emailClaim;
1529

1630
/**
@@ -36,15 +50,16 @@ public boolean equals(Object o) {
3650
return false;
3751
}
3852
BaseSAMLv2IdentityProvider<?> that = (BaseSAMLv2IdentityProvider<?>) o;
39-
return useNameIdForEmail == that.useNameIdForEmail
53+
return Objects.equals(assertionDecryptionConfiguration, that.assertionDecryptionConfiguration)
4054
&& Objects.equals(emailClaim, that.emailClaim)
4155
&& Objects.equals(keyId, that.keyId)
4256
&& Objects.equals(uniqueIdClaim, that.uniqueIdClaim)
57+
&& useNameIdForEmail == that.useNameIdForEmail
4358
&& Objects.equals(usernameClaim, that.usernameClaim);
4459
}
4560

4661
@Override
4762
public int hashCode() {
48-
return Objects.hash(super.hashCode(), emailClaim, keyId, uniqueIdClaim, useNameIdForEmail, usernameClaim);
63+
return Objects.hash(super.hashCode(), assertionDecryptionConfiguration, emailClaim, keyId, uniqueIdClaim, useNameIdForEmail, usernameClaim);
4964
}
5065
}

0 commit comments

Comments
 (0)