Skip to content

Commit 0825ab8

Browse files
authored
Merge wied03/ENG-2158/change-password (#144)
* add new overload case * fix comment capitalization
1 parent bd36d46 commit 0825ab8

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,13 +538,33 @@ public ClientResponse<Void, Errors> checkChangePasswordUsingJWT(String encodedJW
538538
* <p>
539539
* An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
540540
*
541-
* @param loginId The loginId of the User that you intend to change the password for.
541+
* @param loginId The loginId (email or username) of the User that you intend to change the password for.
542542
* @return The ClientResponse object.
543543
*/
544544
public ClientResponse<Void, Errors> checkChangePasswordUsingLoginId(String loginId) {
545545
return start(Void.TYPE, Errors.class)
546546
.uri("/api/user/change-password")
547-
.urlParameter("username", loginId)
547+
.urlParameter("loginId", loginId)
548+
.get()
549+
.go();
550+
}
551+
552+
/**
553+
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
554+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
555+
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
556+
* <p>
557+
* An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
558+
*
559+
* @param loginId The loginId of the User that you intend to change the password for.
560+
* @param loginIdTypes The identity types that FusionAuth will compare the loginId to.
561+
* @return The ClientResponse object.
562+
*/
563+
public ClientResponse<Void, Errors> checkChangePasswordUsingLoginIdAndLoginIdTypes(String loginId, List<String> loginIdTypes) {
564+
return start(Void.TYPE, Errors.class)
565+
.uri("/api/user/change-password")
566+
.urlParameter("loginId", loginId)
567+
.urlParameter("loginIdTypes", loginIdTypes)
548568
.get()
549569
.go();
550570
}
@@ -4206,7 +4226,7 @@ public ClientResponse<UserResponse, Errors> retrieveUserByLoginId(String loginId
42064226
* Retrieves the user for the loginId, using specific loginIdTypes.
42074227
*
42084228
* @param loginId The email or username of the user.
4209-
* @param loginIdTypes the identity types that FusionAuth will compare the loginId to.
4229+
* @param loginIdTypes The identity types that FusionAuth will compare the loginId to.
42104230
* @return The ClientResponse object.
42114231
*/
42124232
public ClientResponse<UserResponse, Errors> retrieveUserByLoginIdWithLoginIdTypes(String loginId, List<String> loginIdTypes) {
@@ -4429,7 +4449,7 @@ public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReportByLogi
44294449
* @param loginId The userId id.
44304450
* @param start The start instant as UTC milliseconds since Epoch.
44314451
* @param end The end instant as UTC milliseconds since Epoch.
4432-
* @param loginIdTypes the identity types that FusionAuth will compare the loginId to.
4452+
* @param loginIdTypes The identity types that FusionAuth will compare the loginId to.
44334453
* @return The ClientResponse object.
44344454
*/
44354455
public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReportByLoginIdAndLoginIdTypes(UUID applicationId, String loginId, long start, long end, List<String> loginIdTypes) {

0 commit comments

Comments
 (0)