Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions lib/fusionauth/fusionauth_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,29 @@ def check_change_password_using_jwt(encoded_jwt)
#
# 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.
#
# @param login_id [string] The loginId of the User that you intend to change the password for.
# @param login_id [string] The loginId (email or username) of the User that you intend to change the password for.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def check_change_password_using_login_id(login_id)
start.uri('/api/user/change-password')
.url_parameter('username', login_id)
.url_parameter('loginId', login_id)
.get
.go
end

#
# Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
# When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
# your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
#
# 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.
#
# @param login_id [string] The loginId of the User that you intend to change the password for.
# @param login_id_types [Array] The identity types that FusionAuth will compare the loginId to.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def check_change_password_using_login_id_and_login_id_types(login_id, login_id_types)
start.uri('/api/user/change-password')
.url_parameter('loginId', login_id)
.url_parameter('loginIdTypes', login_id_types)
.get
.go
end
Expand Down Expand Up @@ -3421,7 +3439,7 @@ def retrieve_user_by_login_id(login_id)
# Retrieves the user for the loginId, using specific loginIdTypes.
#
# @param login_id [string] The email or username of the user.
# @param login_id_types [Array] the identity types that FusionAuth will compare the loginId to.
# @param login_id_types [Array] The identity types that FusionAuth will compare the loginId to.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_user_by_login_id_with_login_id_types(login_id, login_id_types)
start.uri('/api/user')
Expand Down Expand Up @@ -3620,7 +3638,7 @@ def retrieve_user_login_report_by_login_id(application_id, login_id, start, _end
# @param login_id [string] The userId id.
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
# @param login_id_types [Array] the identity types that FusionAuth will compare the loginId to.
# @param login_id_types [Array] The identity types that FusionAuth will compare the loginId to.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_user_login_report_by_login_id_and_login_id_types(application_id, login_id, start, _end, login_id_types)
start.uri('/api/report/login')
Expand Down