Skip to content

Commit e11ec59

Browse files
author
FusionAuth Automation
committed
sync from monorepo 4104cdbf0ffe
1 parent b0f036a commit e11ec59

7 files changed

Lines changed: 44 additions & 160 deletions

File tree

build.savant

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ fusionauthJWTVersion = "5.2.4"
1818
jacksonVersion = "2.21.1"
1919
// No 2.21.0 version available, annotations dropped patch versioning in 2.20+
2020
// pom target has hack to maintain this "patchless" version
21-
jacksonAnnotationsVersion = "2.21"
21+
jacksonAnnotationsVersion = "2.21"
2222
jackson5Version = "3.0.1"
2323
javaErrorVersion = "2.2.3"
24-
restifyVersion = "4.3.0"
24+
restifyVersion = "4.4.0"
2525
testngVersion = "7.5.1"
2626

27-
project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.64.0", licenses: ["ApacheV2_0"]) {
27+
project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.65.0", licenses: ["ApacheV2_0"]) {
2828
workflow {
2929
fetch {
3030
cache()

fusionauth-java-client.iml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
<orderEntry type="module-library">
3333
<library>
3434
<CLASSES>
35-
<root url="jar://$MODULE_DIR$/.savant/cache/com/inversoft/restify/4.3.0/restify-4.3.0.jar!/" />
35+
<root url="jar://$MODULE_DIR$/.savant/cache/com/inversoft/restify/4.4.0/restify-4.4.0.jar!/" />
3636
</CLASSES>
3737
<JAVADOC />
3838
<SOURCES>
39-
<root url="jar://$MODULE_DIR$/.savant/cache/com/inversoft/restify/4.3.0/restify-4.3.0-src.jar!/" />
39+
<root url="jar://$MODULE_DIR$/.savant/cache/com/inversoft/restify/4.4.0/restify-4.4.0-src.jar!/" />
4040
</SOURCES>
4141
</library>
4242
</orderEntry>

pom.xml

Lines changed: 2 additions & 2 deletions
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.64.0</version>
20+
<version>1.65.0</version>
2121
<packaging>jar</packaging>
2222

2323
<name>FusionAuth Java Client Library</name>
@@ -122,7 +122,7 @@
122122
<dependency>
123123
<groupId>com.inversoft</groupId>
124124
<artifactId>restify</artifactId>
125-
<version>4.3.0</version>
125+
<version>4.4.0</version>
126126
<type>jar</type>
127127
<scope>compile</scope>
128128
<optional>false</optional>

src/main/java/io/fusionauth/client/FusionAuthClient.java

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import com.inversoft.rest.JSONBodyHandler;
3535
import com.inversoft.rest.JSONResponseHandler;
3636
import com.inversoft.rest.RESTClient;
37+
import com.inversoft.rest.RetryConfiguration;
3738
import io.fusionauth.domain.LambdaType;
3839
import io.fusionauth.domain.OpenIdConfiguration;
3940
import io.fusionauth.domain.api.APIKeyRequest;
@@ -284,6 +285,18 @@ public class FusionAuthClient {
284285
.registerModule(new JacksonModule())
285286
.registerModule(new FusionAuthJacksonModule());
286287

288+
/**
289+
* Suggested RetryConfiguration to use that retries on 409s when the general error code is [retryableConflict]
290+
*/
291+
public static RetryConfiguration BASIC_RETRY_CONFIGURATION = new RetryConfiguration().with(rc -> rc.retryFunction = clientResponse -> {
292+
if (clientResponse.status == 409 && clientResponse.errorResponse instanceof Errors) {
293+
Errors errors = (Errors) clientResponse.errorResponse;
294+
return errors.generalErrors.stream().anyMatch(e -> e.code.equals("[retryableConflict]"));
295+
}
296+
return false;
297+
}
298+
);
299+
287300
private final String apiKey;
288301

289302
private final String baseURL;
@@ -296,6 +309,8 @@ public class FusionAuthClient {
296309

297310
public int readTimeout;
298311

312+
public RetryConfiguration retryConfiguration;
313+
299314
public FusionAuthClient(String apiKey, String baseURL) {
300315
this(apiKey, baseURL, null);
301316
}
@@ -335,7 +350,9 @@ public FusionAuthClient setTenantId(UUID tenantId) {
335350
return this;
336351
}
337352

338-
return new FusionAuthClient(apiKey, baseURL, connectTimeout, readTimeout, tenantId.toString());
353+
FusionAuthClient client = new FusionAuthClient(apiKey, baseURL, connectTimeout, readTimeout, tenantId.toString());
354+
client.retryConfiguration = this.retryConfiguration;
355+
return client;
339356
}
340357

341358
/**
@@ -346,7 +363,9 @@ public FusionAuthClient setTenantId(UUID tenantId) {
346363
* @return the new FusionAuthClient
347364
*/
348365
public FusionAuthClient setObjectMapper(ObjectMapper objectMapper) {
349-
return new FusionAuthClient(apiKey, baseURL, connectTimeout, readTimeout, tenantId, objectMapper);
366+
FusionAuthClient client = new FusionAuthClient(apiKey, baseURL, connectTimeout, readTimeout, tenantId, objectMapper);
367+
client.retryConfiguration = this.retryConfiguration;
368+
return client;
350369
}
351370

352371
/**
@@ -2473,6 +2492,7 @@ public ClientResponse<IntrospectResponse, OAuthError> introspectAccessTokenWithR
24732492
parameters.put("client_id", Arrays.asList(request.client_id));
24742493
parameters.put("tenantId", Arrays.asList(request.tenantId));
24752494
parameters.put("token", Arrays.asList(request.token));
2495+
parameters.put("token_type_hint", Arrays.asList(request.token_type_hint));
24762496
return startAnonymous(IntrospectResponse.class, OAuthError.class)
24772497
.uri("/oauth2/introspect")
24782498
.bodyHandler(new FormDataBodyHandler(parameters))
@@ -6427,6 +6447,10 @@ protected <T, U> RESTClient<T, U> startAnonymous(Class<T> type, Class<U> errorTy
64276447
client.header(TENANT_ID_HEADER, tenantId);
64286448
}
64296449

6450+
if (retryConfiguration != null) {
6451+
client.retry(retryConfiguration);
6452+
}
6453+
64306454
return client;
64316455
}
64326456

src/main/java/io/fusionauth/client/JWTManager.java

Lines changed: 0 additions & 149 deletions
This file was deleted.

src/main/java/io/fusionauth/domain/oauth2/AccessTokenIntrospectRequest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2025, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2025-2026, 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.
@@ -36,4 +36,13 @@ public class AccessTokenIntrospectRequest {
3636
* The access token returned by this OAuth provider as the result of a successful client credentials grant.
3737
*/
3838
public String token;
39+
40+
/**
41+
* An optional hint to identify the token type.
42+
* <p>
43+
* When this value is omitted, the token can be an access_token or id_token. When this value is specified, it must match the token type.
44+
* <p>
45+
* In order to use a refresh token, this value must be set to refresh_token.
46+
*/
47+
public String token_type_hint;
3948
}

src/main/java/io/fusionauth/domain/search/WebhookEventLogSearchCriteria.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024-2025, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2024-2026, 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.

0 commit comments

Comments
 (0)