From 53ab8a92238b86d82228f93657568e7e8bfeccf1 Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Mon, 8 Dec 2025 17:21:51 -0700 Subject: [PATCH 1/2] client generation/new method --- src/main/python/fusionauth/fusionauth_client.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index 8a8ac66..3c95a71 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -3335,6 +3335,22 @@ def retrieve_two_factor_status(self, user_id, application_id, two_factor_trust_i .get() \ .go() + def retrieve_two_factor_status_body(self, request): + """ + Retrieve a user's two-factor status. + + This can be used to see if a user will need to complete a two-factor challenge to complete a login, + and optionally identify the state of the two-factor trust across various applications. This operation + provides more payload options than retrieveTwoFactorStatus. + + Attributes: + request: The request object that contains all the information used to check the status. + """ + return self.start().uri('/api/two-factor/status') \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def retrieve_user(self, user_id): """ Retrieves the user for the given Id. From c9b7288f497f3a834ab329084426c7c247fb33c6 Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Mon, 8 Dec 2025 20:15:31 -0700 Subject: [PATCH 2/2] better method name --- src/main/python/fusionauth/fusionauth_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index 3c95a71..19dee5b 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -3335,7 +3335,7 @@ def retrieve_two_factor_status(self, user_id, application_id, two_factor_trust_i .get() \ .go() - def retrieve_two_factor_status_body(self, request): + def retrieve_two_factor_status_using(self, request): """ Retrieve a user's two-factor status.