close
Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions descope/management/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -1572,18 +1572,16 @@ def set_password(
self,
login_id: str,
password: str,
set_active: Optional[bool] = False,
) -> None:
"""
Set the password for the given login ID.
Note: The password will automatically be set as expired unless the set_active flag will be set to True,
Note: The password will automatically be set as expired.
The user will not be able to log-in with this password, and will be required to replace it on next login.
See also: expire_password

Args:
login_id (str): The login ID of the user to set the password to.
password (str): The new password to set to the user.
set_active (bool): Keep the password active so it will not be expired on next log-in

Raise:
AuthException: raised if the operation fails
Expand All @@ -1593,7 +1591,6 @@ def set_password(
body={
"loginId": login_id,
"password": password,
"setActive": set_active,
},
)
return
Expand Down
1 change: 0 additions & 1 deletion tests/management/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,6 @@ def test_user_set_password(self):
json={
"loginId": "login-id",
"password": "some-password",
"setActive": False,
},
allow_redirects=False,
verify=True,
Expand Down
Loading