diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index a8ad73f..8a8ac66 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -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() @@ -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)) \ @@ -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)) \