From 2cc1c0ad8fdf802f94b630d6294f0ee0eafbef3b Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Thu, 31 Jul 2025 09:40:14 -0600 Subject: [PATCH 1/3] Client builder sync --- .../python/fusionauth/fusionauth_client.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index 3c82abb..b4e2086 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -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 @@ -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. From 40a5a04942ab138e6443998d9c6ff7dc81c2bd4c Mon Sep 17 00:00:00 2001 From: FusionAuth Automation Date: Thu, 14 Aug 2025 17:37:15 +0000 Subject: [PATCH 2/3] Updated version for fusionauth-python-client to 1.60.0 --- build.savant | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index a4db54a..8bdc77f 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.59.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.60.0", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/setup.py b/setup.py index bfd741f..063238b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="fusionauth-client", - version="1.59.0", + version="1.60.0", author="FusionAuth", author_email="dev@fusionauth.io", description="A client library for FusionAuth", From 4e4067eb150f7ba2fc1e42d0a7ec9cb679c532e4 Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Mon, 18 Aug 2025 10:01:21 -0600 Subject: [PATCH 3/3] sync domain builds --- .../python/fusionauth/fusionauth_client.py | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index b4e2086..a8ad73f 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -260,6 +260,18 @@ def comment_on_user(self, request): .post() \ .go() + def complete_verify_identity(self, request): + """ + Completes verification of an identity using verification codes from the Verify Start API. + + Attributes: + request: The identity verify complete request that contains all the information used to verify the identity. + """ + return self.start().uri('/api/identity/verify/complete') \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def complete_web_authn_assertion(self, request): """ Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in @@ -3400,6 +3412,20 @@ def retrieve_user_by_login_id(self, login_id): .get() \ .go() + def retrieve_user_by_login_id_with_login_id_types(self, login_id, login_id_types): + """ + Retrieves the user for the loginId, using specific loginIdTypes. + + Attributes: + login_id: The email or username of the user. + 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)) \ + .url_parameter('loginIdTypes', self.convert_true_false(login_id_types)) \ + .get() \ + .go() + def retrieve_user_by_username(self, username): """ Retrieves the user for the given username. @@ -3581,6 +3607,27 @@ def retrieve_user_login_report_by_login_id(self, login_id, start, end, applicati .get() \ .go() + def retrieve_user_login_report_by_login_id_and_login_id_types(self, login_id, start, end, login_id_types, application_id=None): + """ + Retrieves the login report between the two instants for a particular user by login Id, using specific loginIdTypes. If you specify an application id, it will only return the + login counts for that application. + + Attributes: + application_id: (Optional) The application id. + 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. + """ + return self.start().uri('/api/report/login') \ + .url_parameter('applicationId', self.convert_true_false(application_id)) \ + .url_parameter('loginId', self.convert_true_false(login_id)) \ + .url_parameter('start', self.convert_true_false(start)) \ + .url_parameter('end', self.convert_true_false(end)) \ + .url_parameter('loginIdTypes', self.convert_true_false(login_id_types)) \ + .get() \ + .go() + def retrieve_user_recent_logins(self, user_id, offset, limit): """ Retrieves the last number of login records for a user. @@ -4210,6 +4257,18 @@ def send_two_factor_code_for_login_using_method(self, two_factor_id, request): .post() \ .go() + def send_verify_identity(self, request): + """ + Send a verification code using the appropriate transport for the identity type being verified. + + Attributes: + request: The identity verify send request that contains all the information used send the code. + """ + return self.start().uri('/api/identity/verify/send') \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def start_identity_provider_login(self, request): """ Begins a login request for a 3rd party login that requires user interaction such as HYPR. @@ -4253,6 +4312,19 @@ def start_two_factor_login(self, request): .post() \ .go() + def start_verify_identity(self, request): + """ + Start a verification of an identity by generating a code. This code can be sent to the User using the Verify Send API + Verification Code API or using a mechanism outside of FusionAuth. The verification is completed by using the Verify Complete API with this code. + + Attributes: + request: The identity verify start request that contains all the information used to begin the request. + """ + return self.start().uri('/api/identity/verify/start') \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def start_web_authn_login(self, request): """ Start a WebAuthn authentication ceremony by generating a new challenge for the user @@ -4835,6 +4907,18 @@ def verify_email_address_by_user_id(self, request): .post() \ .go() + def verify_identity(self, request): + """ + Administratively verify a user identity. + + Attributes: + request: The identity verify request that contains information to verify the identity. + """ + return self.start().uri('/api/identity/verify') \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + @deprecated("This method has been renamed to verify_user_registration and changed to take a JSON request body, use that method instead.") def verify_registration(self, verification_id): """