Skip to content

Commit a0d6525

Browse files
wied03robotdanspwittbhalsey
authored
Merge degroff/ENG-1/issue1 (#140)
* Normalize order for static final. * Updates * Client library updates from enums * latest client updates * latest client updates * Updated version for fusionauth-java-client to 1.55.0 * java-client build * Domain / Client Builder sync * Domain sync * domain sync * Updated version for fusionauth-java-client to 1.56.0 * domain sync * Latest updates from top level field * Latest issue 1 updates * Merge wied03/ENG-1/tenant-mode-internal-user-removal (#51) * 1st pass of "fixes" * Added our missing identity verify API from client builder * Data was removed from real deal * api version removal * Updates from client builder * Updates * update without InternalUser * Updates from app * add top-level user.phoneNumber field ENG-2208 * regen client libraries ENG-2208 * merge develop into issue1 * Merge wied03/ENG-1/ENG-1757/phone_canon_wo_internal_user (#54) * updates from app * updates after merge from issue 1 branch * updates after cleanup (#56) * sync clients with latest degroff/ENG-1/issue1 * add LoginIdType of phoneNumber (#57) * client builder/API updates (#58) * missed updates * generate for identity verification external id configuration * external Id updates * add phone verification complete template and unverified behavior * default phone verification strategy to FormField * Merge wied03/ENG-1963/phone_gating (#64) * client updates and ignore internal TODOs and comments * Catch up * Separate verify start and complete * update after verify request changes * one more phone rename * regen client libraries ENG-2442 * update default phone verification strategy (#82) * phone clickable updates (#81) * add new login API response field (#83) * new claim/phone_number_verified (#86) * add application.registrationConfiguration.requirePassword boolean (#89) * Managed field update (#90) * new API field (#91) * remove application requirePassword, add tenant passwordEnabled (#92) * Merge wied03/ENG-1834/passwordless_start_api (#93) * API change for passwordless start * Updates * Fix this * ENG-2608 - New APIs/method overloads (#96) * blank?? * with our overload * spacing * this should work * add report method * use lists when possible, order is significant here * revert overloads * client correct/optional * now that this overload does not have opt params, remove defaults * Merge spencer/eng-1807/change-password-phone (#95) * forgot password via sms * domain changes * Merge spencer/eng-2281/admin-sms-reset (#97) * forgot password via sms * domain changes * add Buildable interface to ForgotPasswordRequest * Merge wied03/ENG-2546/phone_passwordless_formfield (#94) * apply updates * field rename * remove unneeded field * rename to PasswordlessLoginOneTimeCode * Merge wied03/ENG-2002/sms-send-set-pass (#99) * new API field * more API field stuff * Update (with defaults removed) from fusionauth-app * ENG-2580 - Issue 1 TODO Sweep (#100) * generated java client updates * more removals * add tenant phone verification and template configs (#101) * updated tenant phone config (#102) * refreshrequest update (#103) * add phoneNumber to sort criteria (#104) * Merge wied03/ENG-2455/identity_verif_api_status (#106) * add state to verify complete response and start request * add state to verify complete response and start request * client builder sb build * Merge spencer/eng-2577/admin-phone-verif (#107) add /api/user/verify and request to clients * Merge wied03/ENG-1677/rate_limiting (#108) * rate limiting config change for pwless send phone * client update * wrong branch, another client update * updated stuff from issue 1 branch * restore java client method, mark deprecated * Restore this * Merge wied03/ENG-2349/rename_refactor (#110) * move user.verify package to identity.verify * import sorting * remove VerifySendRequest.oneTimeCode. it is not used on that endpoint (#111) * Merge spencer/eng-2717/app-phone-templates (#113) add Application.phoneConfiguration for phone template overrides * remove deprecation (#114) * Merge wied03/ENG-1822/event_serializer_remove (#115) * sb build updates * remove more stuff * Merge bhalsey/ENG-2388/send_user_events_sms (#118) * add UserIdentityUpdateEvent * really add UserIdentityUpdateEvent * Merge bhalsey/ENG-2047/rename_identityverifiedevent (#124) * identity verified to user identity verified * identity verified to user identity verified * Merge wied03/ENG-2790/password-toggle-resolution (#123) * remove passwordEnabled field * equality/etc removal too * remove identities fields from java client (#125) * TODO was removed, resulting in blank line removal (#131) * Re-run sb build * Setting this causes the this.sendSetPasswordEmail legacy field to get ignored * Catch up to app * Merge spencer/eng-2853/userState (#133) mark `UserState.fromUserAndRegistration` method as deprecated * Merge wied03/ENG-3045/import_verified (#135) * verifiedReason updates * ripple through comment updates * re-ripple through changes * client update from find/replace version (#136) * use enums on api requests (#138) * use PasswordlessStrategy enum for API request * use VerificationStrategy enum for API request * naming standards (#139) * missing client commit * client update from incorrect version * remove need for this version --------- Co-authored-by: Daniel DeGroff <daniel@fusionauth.io> Co-authored-by: Spencer Witt <spencer@fusionauth.io> Co-authored-by: Brent Halsey <brent.halsey@fusionauth.io> Co-authored-by: Spencer Witt <3409780+spwitt@users.noreply.github.com> Co-authored-by: Brent Halsey <211656+bhalsey@users.noreply.github.com>
1 parent abe9ce9 commit a0d6525

File tree

91 files changed

+2159
-198
lines changed

Some content is hidden

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

91 files changed

+2159
-198
lines changed

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)