|
37 | 37 | import io.fusionauth.domain.LambdaType;
|
38 | 38 | import io.fusionauth.domain.OpenIdConfiguration;
|
39 | 39 | import io.fusionauth.domain.api.APIKeyRequest;
|
| 40 | +import io.fusionauth.client.json.FusionAuthJacksonModule; |
40 | 41 | import io.fusionauth.domain.api.APIKeyResponse;
|
41 | 42 | import io.fusionauth.domain.api.ApplicationOAuthScopeRequest;
|
42 | 43 | import io.fusionauth.domain.api.ApplicationOAuthScopeResponse;
|
|
181 | 182 | import io.fusionauth.domain.api.WebhookSearchResponse;
|
182 | 183 | import io.fusionauth.domain.api.email.SendRequest;
|
183 | 184 | 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; |
184 | 191 | import io.fusionauth.domain.api.identityProvider.IdentityProviderLinkRequest;
|
185 | 192 | import io.fusionauth.domain.api.identityProvider.IdentityProviderLinkResponse;
|
186 | 193 | import io.fusionauth.domain.api.identityProvider.IdentityProviderLoginRequest;
|
@@ -260,7 +267,8 @@ public class FusionAuthClient {
|
260 | 267 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
261 | 268 | .configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true)
|
262 | 269 | .configure(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS, true)
|
263 |
| - .registerModule(new JacksonModule()); |
| 270 | + .registerModule(new JacksonModule()) |
| 271 | + .registerModule(new FusionAuthJacksonModule()); |
264 | 272 |
|
265 | 273 | private final String apiKey;
|
266 | 274 |
|
@@ -578,6 +586,20 @@ public ClientResponse<UserCommentResponse, Errors> commentOnUser(UserCommentRequ
|
578 | 586 | .go();
|
579 | 587 | }
|
580 | 588 |
|
| 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 | + |
581 | 603 | /**
|
582 | 604 | * Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
|
583 | 605 | *
|
@@ -4180,6 +4202,22 @@ public ClientResponse<UserResponse, Errors> retrieveUserByLoginId(String loginId
|
4180 | 4202 | .go();
|
4181 | 4203 | }
|
4182 | 4204 |
|
| 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 | + |
4183 | 4221 | /**
|
4184 | 4222 | * Retrieves the user for the given username.
|
4185 | 4223 | *
|
@@ -4383,6 +4421,29 @@ public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReportByLogi
|
4383 | 4421 | .go();
|
4384 | 4422 | }
|
4385 | 4423 |
|
| 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 | + |
4386 | 4447 | /**
|
4387 | 4448 | * Retrieves the last number of login records for a user.
|
4388 | 4449 | *
|
@@ -5114,6 +5175,20 @@ public ClientResponse<Void, Errors> sendTwoFactorCodeForLoginUsingMethod(String
|
5114 | 5175 | .go();
|
5115 | 5176 | }
|
5116 | 5177 |
|
| 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 | + |
5117 | 5192 | /**
|
5118 | 5193 | * Begins a login request for a 3rd party login that requires user interaction such as HYPR.
|
5119 | 5194 | *
|
@@ -5163,6 +5238,21 @@ public ClientResponse<TwoFactorStartResponse, Errors> startTwoFactorLogin(TwoFac
|
5163 | 5238 | .go();
|
5164 | 5239 | }
|
5165 | 5240 |
|
| 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 | + |
5166 | 5256 | /**
|
5167 | 5257 | * Start a WebAuthn authentication ceremony by generating a new challenge for the user
|
5168 | 5258 | *
|
@@ -5828,6 +5918,20 @@ public ClientResponse<Void, Errors> verifyEmailAddressByUserId(VerifyEmailReques
|
5828 | 5918 | .go();
|
5829 | 5919 | }
|
5830 | 5920 |
|
| 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 | + |
5831 | 5935 | /**
|
5832 | 5936 | * Confirms an application registration. The Id given is usually from an email sent to the user.
|
5833 | 5937 | *
|
|
0 commit comments