Skip to content

Commit e158f79

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

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/main/python/fusionauth/fusionauth_client.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,29 @@ def check_change_password_using_login_id(self, login_id):
218218
219219
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.
220220
221+
Attributes:
222+
login_id: The loginId (email or username) of the User that you intend to change the password for.
223+
"""
224+
return self.start().uri('/api/user/change-password') \
225+
.url_parameter('loginId', self.convert_true_false(login_id)) \
226+
.get() \
227+
.go()
228+
229+
def check_change_password_using_login_id_and_login_id_types(self, login_id, login_id_types):
230+
"""
231+
Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
232+
When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
233+
your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
234+
235+
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.
236+
221237
Attributes:
222238
login_id: The loginId of the User that you intend to change the password for.
239+
login_id_types: The identity types that FusionAuth will compare the loginId to.
223240
"""
224241
return self.start().uri('/api/user/change-password') \
225-
.url_parameter('username', self.convert_true_false(login_id)) \
242+
.url_parameter('loginId', self.convert_true_false(login_id)) \
243+
.url_parameter('loginIdTypes', self.convert_true_false(login_id_types)) \
226244
.get() \
227245
.go()
228246

@@ -3418,7 +3436,7 @@ def retrieve_user_by_login_id_with_login_id_types(self, login_id, login_id_types
34183436
34193437
Attributes:
34203438
login_id: The email or username of the user.
3421-
login_id_types: the identity types that FusionAuth will compare the loginId to.
3439+
login_id_types: The identity types that FusionAuth will compare the loginId to.
34223440
"""
34233441
return self.start().uri('/api/user') \
34243442
.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
36173635
login_id: The userId id.
36183636
start: The start instant as UTC milliseconds since Epoch.
36193637
end: The end instant as UTC milliseconds since Epoch.
3620-
login_id_types: the identity types that FusionAuth will compare the loginId to.
3638+
login_id_types: The identity types that FusionAuth will compare the loginId to.
36213639
"""
36223640
return self.start().uri('/api/report/login') \
36233641
.url_parameter('applicationId', self.convert_true_false(application_id)) \

0 commit comments

Comments
 (0)