Skip to content

ENG-622 - Support for the prompt parameter #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions src/main/python/fusionauth/fusionauth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def change_password(self, change_password_id, request):
.post() \
.go()

@deprecated("This method has been renamed to change_password_using_jwt, use that method instead.")
def change_password_by_jwt(self, encoded_jwt, request):
"""
Changes a user's password using their access token (JWT) instead of the changePasswordId
Expand Down Expand Up @@ -160,6 +161,23 @@ def change_password_by_identity(self, request):
.post() \
.go()

def change_password_using_jwt(self, encoded_jwt, request):
"""
Changes a user's password using their access token (JWT) instead of the changePasswordId
A common use case for this method will be if you want to allow the user to change their own password.

Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword.

Attributes:
encoded_jwt: The encoded JWT (access token).
request: The change password request that contains all the information used to change the password.
"""
return self.start_anonymous().uri('/api/user/change-password') \
.authorization("Bearer " + encoded_jwt) \
.body_handler(JSONBodyHandler(request)) \
.post() \
.go()

def check_change_password_using_id(self, change_password_id):
"""
Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
Expand Down
Loading