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
24 changes: 21 additions & 3 deletions src/main/python/fusionauth/fusionauth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,29 @@ def check_change_password_using_login_id(self, login_id):

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.

Attributes:
login_id: The loginId (email or username) of the User that you intend to change the password for.
"""
return self.start().uri('/api/user/change-password') \
.url_parameter('loginId', self.convert_true_false(login_id)) \
.get() \
.go()

def check_change_password_using_login_id_and_login_id_types(self, login_id, login_id_types):
"""
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.

Attributes:
login_id: The loginId of the User that you intend to change the password for.
login_id_types: The identity types that FusionAuth will compare the loginId to.
"""
return self.start().uri('/api/user/change-password') \
.url_parameter('username', self.convert_true_false(login_id)) \
.url_parameter('loginId', self.convert_true_false(login_id)) \
.url_parameter('loginIdTypes', self.convert_true_false(login_id_types)) \
.get() \
.go()

Expand Down Expand Up @@ -3418,7 +3436,7 @@ def retrieve_user_by_login_id_with_login_id_types(self, login_id, login_id_types

Attributes:
login_id: The email or username of the user.
login_id_types: the identity types that FusionAuth will compare the loginId to.
login_id_types: The identity types that FusionAuth will compare the loginId to.
"""
return self.start().uri('/api/user') \
.url_parameter('loginId', self.convert_true_false(login_id)) \
Expand Down Expand Up @@ -3617,7 +3635,7 @@ def retrieve_user_login_report_by_login_id_and_login_id_types(self, login_id, st
login_id: The userId id.
start: The start instant as UTC milliseconds since Epoch.
end: The end instant as UTC milliseconds since Epoch.
login_id_types: the identity types that FusionAuth will compare the loginId to.
login_id_types: The identity types that FusionAuth will compare the loginId to.
"""
return self.start().uri('/api/report/login') \
.url_parameter('applicationId', self.convert_true_false(application_id)) \
Expand Down