Skip to content

Commit 9c81c91

Browse files
committed
sync domain builds
1 parent b39c434 commit 9c81c91

91 files changed

Lines changed: 2159 additions & 198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 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.
@@ -40,7 +40,7 @@ public ExceptionDelegate() {
4040
* @param <U> The error response type.
4141
* @return The success response type if the API call was successful.
4242
* @throws FusionAuthClientException If the status code was anything exception 2xx or 404 or there was a problem calling
43-
* the API (network or something similar).
43+
* the API (network or something similar).
4444
*/
4545
@SuppressWarnings("unchecked")
4646
public <T, U> T execute(Supplier<ClientResponse<T, U>> supplier) {

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

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import io.fusionauth.domain.LambdaType;
3838
import io.fusionauth.domain.OpenIdConfiguration;
3939
import io.fusionauth.domain.api.APIKeyRequest;
40+
import io.fusionauth.client.json.FusionAuthJacksonModule;
4041
import io.fusionauth.domain.api.APIKeyResponse;
4142
import io.fusionauth.domain.api.ApplicationOAuthScopeRequest;
4243
import io.fusionauth.domain.api.ApplicationOAuthScopeResponse;
@@ -181,6 +182,12 @@
181182
import io.fusionauth.domain.api.WebhookSearchResponse;
182183
import io.fusionauth.domain.api.email.SendRequest;
183184
import io.fusionauth.domain.api.email.SendResponse;
185+
import io.fusionauth.domain.api.identity.verify.VerifyCompleteRequest;
186+
import io.fusionauth.domain.api.identity.verify.VerifyCompleteResponse;
187+
import io.fusionauth.domain.api.identity.verify.VerifyRequest;
188+
import io.fusionauth.domain.api.identity.verify.VerifyStartRequest;
189+
import io.fusionauth.domain.api.identity.verify.VerifyStartResponse;
190+
import io.fusionauth.domain.api.identity.verify.VerifySendRequest;
184191
import io.fusionauth.domain.api.identityProvider.IdentityProviderLinkRequest;
185192
import io.fusionauth.domain.api.identityProvider.IdentityProviderLinkResponse;
186193
import io.fusionauth.domain.api.identityProvider.IdentityProviderLoginRequest;
@@ -260,7 +267,8 @@ public class FusionAuthClient {
260267
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
261268
.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true)
262269
.configure(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS, true)
263-
.registerModule(new JacksonModule());
270+
.registerModule(new JacksonModule())
271+
.registerModule(new FusionAuthJacksonModule());
264272

265273
private final String apiKey;
266274

@@ -578,6 +586,20 @@ public ClientResponse<UserCommentResponse, Errors> commentOnUser(UserCommentRequ
578586
.go();
579587
}
580588

589+
/**
590+
* Completes verification of an identity using verification codes from the Verify Start API.
591+
*
592+
* @param request The identity verify complete request that contains all the information used to verify the identity.
593+
* @return The ClientResponse object.
594+
*/
595+
public ClientResponse<VerifyCompleteResponse, Errors> completeVerifyIdentity(VerifyCompleteRequest request) {
596+
return start(VerifyCompleteResponse.class, Errors.class)
597+
.uri("/api/identity/verify/complete")
598+
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
599+
.post()
600+
.go();
601+
}
602+
581603
/**
582604
* Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
583605
*
@@ -4180,6 +4202,22 @@ public ClientResponse<UserResponse, Errors> retrieveUserByLoginId(String loginId
41804202
.go();
41814203
}
41824204

4205+
/**
4206+
* Retrieves the user for the loginId, using specific loginIdTypes.
4207+
*
4208+
* @param loginId The email or username of the user.
4209+
* @param loginIdTypes the identity types that FusionAuth will compare the loginId to.
4210+
* @return The ClientResponse object.
4211+
*/
4212+
public ClientResponse<UserResponse, Errors> retrieveUserByLoginIdWithLoginIdTypes(String loginId, List<String> loginIdTypes) {
4213+
return start(UserResponse.class, Errors.class)
4214+
.uri("/api/user")
4215+
.urlParameter("loginId", loginId)
4216+
.urlParameter("loginIdTypes", loginIdTypes)
4217+
.get()
4218+
.go();
4219+
}
4220+
41834221
/**
41844222
* Retrieves the user for the given username.
41854223
*
@@ -4383,6 +4421,29 @@ public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReportByLogi
43834421
.go();
43844422
}
43854423

4424+
/**
4425+
* Retrieves the login report between the two instants for a particular user by login Id, using specific loginIdTypes. If you specify an application id, it will only return the
4426+
* login counts for that application.
4427+
*
4428+
* @param applicationId (Optional) The application id.
4429+
* @param loginId The userId id.
4430+
* @param start The start instant as UTC milliseconds since Epoch.
4431+
* @param end The end instant as UTC milliseconds since Epoch.
4432+
* @param loginIdTypes the identity types that FusionAuth will compare the loginId to.
4433+
* @return The ClientResponse object.
4434+
*/
4435+
public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReportByLoginIdAndLoginIdTypes(UUID applicationId, String loginId, long start, long end, List<String> loginIdTypes) {
4436+
return start(LoginReportResponse.class, Errors.class)
4437+
.uri("/api/report/login")
4438+
.urlParameter("applicationId", applicationId)
4439+
.urlParameter("loginId", loginId)
4440+
.urlParameter("start", start)
4441+
.urlParameter("end", end)
4442+
.urlParameter("loginIdTypes", loginIdTypes)
4443+
.get()
4444+
.go();
4445+
}
4446+
43864447
/**
43874448
* Retrieves the last number of login records for a user.
43884449
*
@@ -5114,6 +5175,20 @@ public ClientResponse<Void, Errors> sendTwoFactorCodeForLoginUsingMethod(String
51145175
.go();
51155176
}
51165177

5178+
/**
5179+
* Send a verification code using the appropriate transport for the identity type being verified.
5180+
*
5181+
* @param request The identity verify send request that contains all the information used send the code.
5182+
* @return The ClientResponse object.
5183+
*/
5184+
public ClientResponse<Void, Errors> sendVerifyIdentity(VerifySendRequest request) {
5185+
return start(Void.TYPE, Errors.class)
5186+
.uri("/api/identity/verify/send")
5187+
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
5188+
.post()
5189+
.go();
5190+
}
5191+
51175192
/**
51185193
* Begins a login request for a 3rd party login that requires user interaction such as HYPR.
51195194
*
@@ -5163,6 +5238,21 @@ public ClientResponse<TwoFactorStartResponse, Errors> startTwoFactorLogin(TwoFac
51635238
.go();
51645239
}
51655240

5241+
/**
5242+
* Start a verification of an identity by generating a code. This code can be sent to the User using the Verify Send API
5243+
* Verification Code API or using a mechanism outside of FusionAuth. The verification is completed by using the Verify Complete API with this code.
5244+
*
5245+
* @param request The identity verify start request that contains all the information used to begin the request.
5246+
* @return The ClientResponse object.
5247+
*/
5248+
public ClientResponse<VerifyStartResponse, Errors> startVerifyIdentity(VerifyStartRequest request) {
5249+
return start(VerifyStartResponse.class, Errors.class)
5250+
.uri("/api/identity/verify/start")
5251+
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
5252+
.post()
5253+
.go();
5254+
}
5255+
51665256
/**
51675257
* Start a WebAuthn authentication ceremony by generating a new challenge for the user
51685258
*
@@ -5828,6 +5918,20 @@ public ClientResponse<Void, Errors> verifyEmailAddressByUserId(VerifyEmailReques
58285918
.go();
58295919
}
58305920

5921+
/**
5922+
* Administratively verify a user identity.
5923+
*
5924+
* @param request The identity verify request that contains information to verify the identity.
5925+
* @return The ClientResponse object.
5926+
*/
5927+
public ClientResponse<Void, Errors> verifyIdentity(VerifyRequest request) {
5928+
return start(Void.TYPE, Errors.class)
5929+
.uri("/api/identity/verify")
5930+
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
5931+
.post()
5932+
.go();
5933+
}
5934+
58315935
/**
58325936
* Confirms an application registration. The Id given is usually from an email sent to the user.
58335937
*

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

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

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2018-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.client;
517

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

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

src/main/java/io/fusionauth/client/json/ConnectorJacksonHelper.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2020-2022, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2020-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.client.json;
517

src/main/java/io/fusionauth/client/json/ConnectorRequestDeserializer.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2019-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-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.client.json;
517

src/main/java/io/fusionauth/client/json/ConnectorResponseDeserializer.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2019-2022, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-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.client.json;
517

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2024-2025, FusionAuth, All Rights Reserved
3+
*/
4+
package io.fusionauth.client.json;
5+
6+
import com.fasterxml.jackson.databind.module.SimpleModule;
7+
import io.fusionauth.domain.IdentityType;
8+
9+
/**
10+
* FusionAuth specific Jackson bindings. This can be used in the public FusionAuth client.
11+
*
12+
* @author Daniel DeGroff
13+
*/
14+
public class FusionAuthJacksonModule extends SimpleModule {
15+
public FusionAuthJacksonModule() {
16+
addSerializer(IdentityType.class, new IdentityTypeSerializer());
17+
addDeserializer(IdentityType.class, new IdentityTypeDeserializer());
18+
}
19+
}

src/main/java/io/fusionauth/client/json/IdentityProviderJacksonHelper.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2019-2022, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-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.client.json;
517

0 commit comments

Comments
 (0)