Skip to content

Commit 4e08521

Browse files
authored
Merge pull request #50 from LoginRadius/dev_release_version_11.6.0
Release Version 11.6.0
2 parents a00529c + fea8c1b commit 4e08521

30 files changed

+1095
-432
lines changed

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# LoginRadius Python SDK Change Log
22

3+
# Version 11.6.0
4+
5+
Release on **July 16, 2024**
6+
7+
## Added following APIs:
8+
- `mfa_validate_authenticator_code`
9+
- `mfa_verify_authenticator_code`
10+
- `revoke_all_refresh_token `
11+
- `multipurpose_email_token_generation`
12+
- `multipurpose_sms_otp_generation`
13+
- `mfa_re_authenticate_by_authenticator_code`
14+
- `auth_send_verification_email_for_linking_social_profiles `
15+
- `sliding_access_token`
16+
- `access_token_via_custom_j_w_t_token`
17+
- `mfa_reset_authenticator_by_token`
18+
- `mfa_reset_authenticator_by_uid`
19+
20+
## Enhancements
21+
- Added `is_voice_otp` parameter in `reset_phone_id_verification_by_uid` API
22+
- Added `is_voice_otp` parameter in `mfa_configure_by_access_token` API
23+
- Added `is_voice_otp` and `options` parameter in `mfa_update_phone_number_by_token` API
24+
- Added `is_voice_otp`, `email_template2_f_a` and `options` parameter in `mfa_login_by_email` API
25+
- Added `is_voice_otp` and `email_template2_f_a` parameter in `mfa_login_by_user_name` API
26+
- Added `is_voice_otp` , `email_template2_f_a` and `options` parameter in `mfa_login_by_phone` API
27+
- Added `is_voice_otp` and `options` parameter in `mfa_update_phone_number` API
28+
- Added `is_voice_otp` parameter in `mfa_resend_otp` API
29+
- Added `is_voice_otp` parameter in `mfa_re_authenticate` API
30+
- Added `is_voice_otp` and `options` parameter in `update_profile_by_access_token` API
31+
- Added `is_voice_otp` parameter in `user_registration_by_email` API
32+
- Added `is_voice_otp` parameter in `user_registration_by_captcha` API
33+
- Added `is_voice_otp` parameter in `one_touch_login_by_phone` API
34+
- Added `is_voice_otp` parameter in `passwordless_login_phone_verification` API
35+
- Added `is_voice_otp` parameter in `passwordless_login_by_phone` API
36+
- Added `is_voice_otp` parameter in `forgot_password_by_phone_otp` API
37+
- Added `is_voice_otp` parameter in `phone_verification_by_otp` API
38+
- Added `is_voice_otp` parameter in `phone_verification_otp_by_access_token` API
39+
- Added `is_voice_otp` parameter in `phone_resend_verification_otp` API
40+
- Added `is_voice_otp` parameter in `update_phone_number` API
41+
- Added `is_voice_otp` and `email_template` parameter in `user_registration_by_phone` API
42+
- Added `is_voice_otp` parameter in `send_forgot_pin_sms_by_phone` API
43+
- Added `uuid` parameter in `verify_email` API
44+
45+
## Removed the following parameter
46+
47+
-`sms_template` parameter in `mfa_configure_by_access_token` API
48+
49+
50+
51+
## Removed (Deprecated) APIs:
52+
- `mfa_validate_google_auth_code`
53+
- `mfa_re_authenticate_by_google_auth`
54+
- `mfa_reset_google_auth_by_token `
55+
- `mfa_reset_google_authenticator_by_uid`
56+
- `mfa_update_by_access_token`
57+
358
# Version 11.5.0
459

560
## Enhancements

Demo/LoginRadius/api/account/account_api.py

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,13 @@ def get_access_token_by_uid(self, uid):
394394
resource_path = "identity/v2/manage/account/access_token"
395395
return self._lr_object.execute("GET", resource_path, query_parameters, {})
396396

397-
def reset_phone_id_verification_by_uid(self, uid, sms_template=''):
397+
def reset_phone_id_verification_by_uid(self, uid, sms_template='', is_voice_otp=False):
398398
"""This API Allows you to reset the phone no verification of an end user’s account.
399399
400400
Args:
401401
uid: UID, the unified identifier for each user account
402402
sms_template: SMS Template name
403+
is_voice_otp: Boolean, pass true if you wish to trigger voice OTP
403404
404405
Returns:
405406
Response containing Definition of Complete Validation data
@@ -414,6 +415,8 @@ def reset_phone_id_verification_by_uid(self, uid, sms_template=''):
414415
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
415416
if(not self._lr_object.is_null_or_whitespace(sms_template)):
416417
query_parameters["smsTemplate"] = sms_template
418+
if(is_voice_otp is not None):
419+
query_parameters["isVoiceOtp"] = is_voice_otp
417420

418421
resource_path = "identity/v2/manage/account/" + uid + "/invalidatephone"
419422
return self._lr_object.execute("PUT", resource_path, query_parameters, {})
@@ -520,6 +523,51 @@ def revoke_refresh_token(self, refresh__token):
520523
resource_path = "identity/v2/manage/account/access_token/refresh/revoke"
521524
return self._lr_object.execute("GET", resource_path, query_parameters, {})
522525

526+
def revoke_all_refresh_token(self, uid):
527+
"""The Revoke All Refresh Access Token API is used to revoke all refresh tokens for a specific user.
528+
529+
Args:
530+
uid: UID, the unified identifier for each user account
531+
532+
Returns:
533+
Response containing Definition of Delete Request
534+
18.33
535+
"""
536+
537+
if(self._lr_object.is_null_or_whitespace(uid)):
538+
raise Exception(self._lr_object.get_validation_message("uid"))
539+
540+
query_parameters = {}
541+
query_parameters["apiKey"] = self._lr_object.get_api_key()
542+
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
543+
544+
resource_path = "identity/v2/manage/account/" + uid + "/access_token/refresh/revoke"
545+
return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
546+
547+
def multipurpose_email_token_generation(self, multi_email_token, tokentype):
548+
"""This API generate Email tokens and Email OTPs for Email verification, Add email, Forgot password, Delete user, Passwordless login, Forgot pin, One-touch login and Auto login.
549+
550+
Args:
551+
multi_email_token: Model Class containing Definition of payload for Multipurpose Email Token Generation API
552+
tokentype: The identifier type for the token that we need to generate
553+
554+
Returns:
555+
Response containing Definition for Complete MultiToken
556+
18.34
557+
"""
558+
if(multi_email_token is None):
559+
raise Exception(self._lr_object.get_validation_message("multi_email_token"))
560+
561+
if(self._lr_object.is_null_or_whitespace(tokentype)):
562+
raise Exception(self._lr_object.get_validation_message("tokentype"))
563+
564+
query_parameters = {}
565+
query_parameters["apiKey"] = self._lr_object.get_api_key()
566+
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
567+
568+
resource_path = "identity/v2/manage/account/emailtoken/" + tokentype
569+
return self._lr_object.execute("POST", resource_path, query_parameters, multi_email_token)
570+
523571
def get_account_identities_by_email(self, email, fields=''):
524572
"""Note: This is intended for specific workflows where an email may be associated to multiple UIDs. This API is used to retrieve all of the identities (UID and Profiles), associated with a specified email in Cloud Storage.
525573
@@ -567,6 +615,30 @@ def account_delete_by_email(self, email):
567615
resource_path = "identity/v2/manage/account"
568616
return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
569617

618+
def multipurpose_sms_otp_generation(self, multi_sms_otp, smsotptype):
619+
"""This API generates SMS OTP for Add phone, Phone Id verification, Forgot password, Forgot pin, One-touch login, smart login and Passwordless login.
620+
621+
Args:
622+
multi_sms_otp:
623+
smsotptype: The identifier type for the OTP that we need to generate
624+
625+
Returns:
626+
Response containing Definition for Complete MultiToken
627+
18.44
628+
"""
629+
if(multi_sms_otp is None):
630+
raise Exception(self._lr_object.get_validation_message("multi_sms_otp"))
631+
632+
if(self._lr_object.is_null_or_whitespace(smsotptype)):
633+
raise Exception(self._lr_object.get_validation_message("smsotptype"))
634+
635+
query_parameters = {}
636+
query_parameters["apiKey"] = self._lr_object.get_api_key()
637+
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
638+
639+
resource_path = "identity/v2/manage/account/smsotp/" + smsotptype
640+
return self._lr_object.execute("POST", resource_path, query_parameters, multi_sms_otp)
641+
570642
def account_update_uid(self, update_uid_model, uid):
571643
"""This API is used to update a user's Uid. It will update all profiles, custom objects and consent management logs associated with the Uid.
572644

0 commit comments

Comments
 (0)