Skip to content

Commit 4e4067e

Browse files
committed
sync domain builds
1 parent 2cc1c0a commit 4e4067e

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

src/main/python/fusionauth/fusionauth_client.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,18 @@ def comment_on_user(self, request):
260260
.post() \
261261
.go()
262262

263+
def complete_verify_identity(self, request):
264+
"""
265+
Completes verification of an identity using verification codes from the Verify Start API.
266+
267+
Attributes:
268+
request: The identity verify complete request that contains all the information used to verify the identity.
269+
"""
270+
return self.start().uri('/api/identity/verify/complete') \
271+
.body_handler(JSONBodyHandler(request)) \
272+
.post() \
273+
.go()
274+
263275
def complete_web_authn_assertion(self, request):
264276
"""
265277
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):
34003412
.get() \
34013413
.go()
34023414

3415+
def retrieve_user_by_login_id_with_login_id_types(self, login_id, login_id_types):
3416+
"""
3417+
Retrieves the user for the loginId, using specific loginIdTypes.
3418+
3419+
Attributes:
3420+
login_id: The email or username of the user.
3421+
login_id_types: the identity types that FusionAuth will compare the loginId to.
3422+
"""
3423+
return self.start().uri('/api/user') \
3424+
.url_parameter('loginId', self.convert_true_false(login_id)) \
3425+
.url_parameter('loginIdTypes', self.convert_true_false(login_id_types)) \
3426+
.get() \
3427+
.go()
3428+
34033429
def retrieve_user_by_username(self, username):
34043430
"""
34053431
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
35813607
.get() \
35823608
.go()
35833609

3610+
def retrieve_user_login_report_by_login_id_and_login_id_types(self, login_id, start, end, login_id_types, application_id=None):
3611+
"""
3612+
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
3613+
login counts for that application.
3614+
3615+
Attributes:
3616+
application_id: (Optional) The application id.
3617+
login_id: The userId id.
3618+
start: The start instant as UTC milliseconds since Epoch.
3619+
end: The end instant as UTC milliseconds since Epoch.
3620+
login_id_types: the identity types that FusionAuth will compare the loginId to.
3621+
"""
3622+
return self.start().uri('/api/report/login') \
3623+
.url_parameter('applicationId', self.convert_true_false(application_id)) \
3624+
.url_parameter('loginId', self.convert_true_false(login_id)) \
3625+
.url_parameter('start', self.convert_true_false(start)) \
3626+
.url_parameter('end', self.convert_true_false(end)) \
3627+
.url_parameter('loginIdTypes', self.convert_true_false(login_id_types)) \
3628+
.get() \
3629+
.go()
3630+
35843631
def retrieve_user_recent_logins(self, user_id, offset, limit):
35853632
"""
35863633
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):
42104257
.post() \
42114258
.go()
42124259

4260+
def send_verify_identity(self, request):
4261+
"""
4262+
Send a verification code using the appropriate transport for the identity type being verified.
4263+
4264+
Attributes:
4265+
request: The identity verify send request that contains all the information used send the code.
4266+
"""
4267+
return self.start().uri('/api/identity/verify/send') \
4268+
.body_handler(JSONBodyHandler(request)) \
4269+
.post() \
4270+
.go()
4271+
42134272
def start_identity_provider_login(self, request):
42144273
"""
42154274
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):
42534312
.post() \
42544313
.go()
42554314

4315+
def start_verify_identity(self, request):
4316+
"""
4317+
Start a verification of an identity by generating a code. This code can be sent to the User using the Verify Send API
4318+
Verification Code API or using a mechanism outside of FusionAuth. The verification is completed by using the Verify Complete API with this code.
4319+
4320+
Attributes:
4321+
request: The identity verify start request that contains all the information used to begin the request.
4322+
"""
4323+
return self.start().uri('/api/identity/verify/start') \
4324+
.body_handler(JSONBodyHandler(request)) \
4325+
.post() \
4326+
.go()
4327+
42564328
def start_web_authn_login(self, request):
42574329
"""
42584330
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):
48354907
.post() \
48364908
.go()
48374909

4910+
def verify_identity(self, request):
4911+
"""
4912+
Administratively verify a user identity.
4913+
4914+
Attributes:
4915+
request: The identity verify request that contains information to verify the identity.
4916+
"""
4917+
return self.start().uri('/api/identity/verify') \
4918+
.body_handler(JSONBodyHandler(request)) \
4919+
.post() \
4920+
.go()
4921+
48384922
@deprecated("This method has been renamed to verify_user_registration and changed to take a JSON request body, use that method instead.")
48394923
def verify_registration(self, verification_id):
48404924
"""

0 commit comments

Comments
 (0)