Skip to content

Commit c4ff60f

Browse files
authored
Merge wied03/ENG-2158/change-password (#48)
* add new overload case * fix comment capitalization
1 parent bd916df commit c4ff60f

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

lib/fusionauth/fusionauth_client.rb

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,29 @@ def check_change_password_using_jwt(encoded_jwt)
222222
#
223223
# 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.
224224
#
225-
# @param login_id [string] The loginId of the User that you intend to change the password for.
225+
# @param login_id [string] The loginId (email or username) of the User that you intend to change the password for.
226226
# @return [FusionAuth::ClientResponse] The ClientResponse object.
227227
def check_change_password_using_login_id(login_id)
228228
start.uri('/api/user/change-password')
229-
.url_parameter('username', login_id)
229+
.url_parameter('loginId', login_id)
230+
.get
231+
.go
232+
end
233+
234+
#
235+
# Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
236+
# When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
237+
# your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
238+
#
239+
# 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.
240+
#
241+
# @param login_id [string] The loginId of the User that you intend to change the password for.
242+
# @param login_id_types [Array] The identity types that FusionAuth will compare the loginId to.
243+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
244+
def check_change_password_using_login_id_and_login_id_types(login_id, login_id_types)
245+
start.uri('/api/user/change-password')
246+
.url_parameter('loginId', login_id)
247+
.url_parameter('loginIdTypes', login_id_types)
230248
.get
231249
.go
232250
end
@@ -3421,7 +3439,7 @@ def retrieve_user_by_login_id(login_id)
34213439
# Retrieves the user for the loginId, using specific loginIdTypes.
34223440
#
34233441
# @param login_id [string] The email or username of the user.
3424-
# @param login_id_types [Array] the identity types that FusionAuth will compare the loginId to.
3442+
# @param login_id_types [Array] The identity types that FusionAuth will compare the loginId to.
34253443
# @return [FusionAuth::ClientResponse] The ClientResponse object.
34263444
def retrieve_user_by_login_id_with_login_id_types(login_id, login_id_types)
34273445
start.uri('/api/user')
@@ -3620,7 +3638,7 @@ def retrieve_user_login_report_by_login_id(application_id, login_id, start, _end
36203638
# @param login_id [string] The userId id.
36213639
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
36223640
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3623-
# @param login_id_types [Array] the identity types that FusionAuth will compare the loginId to.
3641+
# @param login_id_types [Array] The identity types that FusionAuth will compare the loginId to.
36243642
# @return [FusionAuth::ClientResponse] The ClientResponse object.
36253643
def retrieve_user_login_report_by_login_id_and_login_id_types(application_id, login_id, start, _end, login_id_types)
36263644
start.uri('/api/report/login')

0 commit comments

Comments
 (0)