Skip to content

Commit 80e9d36

Browse files
committed
Released Version 11.1.0
1 parent b9a6ea0 commit 80e9d36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+665
-420
lines changed

CHANGELOG.md

Lines changed: 33 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# LoginRadius Python SDK Change Log
22

3+
4+
# Version 11.1.0
5+
6+
## Enhancements:
7+
- Added X-Origin-IP header support.
8+
- Added 429 error code handling for "Too Many Request in a particular time frame".
9+
- urllib3 support
10+
- Fixed Delete API issue
11+
12+
## Added new multiple APIs for better user experience:
13+
- Get Profile By Ping.
14+
- Passwordless Login Verification By Email And OTP.
15+
- Passwordless Login Verification By User Name And OTP.
16+
17+
18+
319
# Version 11.0.0
4-
Released on **August 11,2020**
20+
521
## Enhancements:
622
- Added a parameter isWeb in "RefreshAccessToken" API.
723
- Added a parameter SocialAppName in "getAccessTokenByFacebookAccessToken, getAccessTokenByTwitterAccessToken,
@@ -18,84 +34,22 @@ Released on **August 11,2020**
1834
- linkSocialIdentity API(PUT)
1935
- getSocialIdentity API(GET)
2036

21-
# Version 10.0.1
22-
Released on **Oct 24,2019**
23-
## Enhancements
24-
- Fixed the pip installation issue
25-
2637
# Version 10.0.0
27-
Released on **September 30,2019**
28-
29-
## Enhancements
30-
This full version release includes major breaking changes with several improvements and optimizations :
31-
32-
- Enhanced the coding standards of SDK to follow industry programming styles and best practices.
33-
- Enhanced security standards of SDK.
34-
- Reduced code between the business layer and persistence layer for optimization of SDK performance.
35-
- Added internal parameter validations in the API function.
36-
- ApiKey and ApiSecret usage redundancy removed.
37-
- All LoginRadius related features need to be defined once only and SDK will handle them automatically.
38-
- Improved the naming conventions of API functions for better readability.
39-
- Better Exception Handling for LoginRadius API Response in SDK.
40-
- Revamped complete SDK and restructured it with latest API function names and parameters.
41-
- Added detailed description to API functions and parameters for better understanding.
42-
- Updated the demo according to latest SDK changes.
43-
- Implemented API Region Feature.
44-
- Added PIN Authentication feature APIs.
45-
- Added Consent Management feature APIs.
46-
- Added Local SOTT generation
47-
48-
49-
## Added new multiple APIs for better user experience
50-
51-
- Update Phone ID by UID
52-
- Upsert Email
53-
- Role Context profile
54-
- MFA Resend OTP
55-
- User Registration By Captcha
56-
- Get Access Token via Linkedin Token
57-
- Get Access Token By Foursquare Access Token
58-
- Get Active Session By Account Id
59-
- Get Active Session By Profile Id
60-
- Delete User Profiles By Email
61-
- Verify Multifactor OTP Authentication
62-
- Verify Multifactor Password Authentication
63-
- Verify Multifactor PIN Authentication
64-
- Update UID
65-
- MFA Re-authentication by PIN
66-
- PIN Login
67-
- Forgot PIN By Email
68-
- Forgot PIN By UserName
69-
- Reset PIN By ResetToken
70-
- Reset PIN By SecurityAnswer And Email
71-
- Reset PIN By SecurityAnswer And Username
72-
- Reset PIN By SecurityAnswer And Phone
73-
- Forgot PIN By Phone
74-
- Change PIN By Token
75-
- Reset PIN by Phone and OTP
76-
- Reset PIN by Email and OTP
77-
- Reset PIN by Username and OTP
78-
- Set PIN By PinAuthToken
79-
- Invalidate PIN Session Token
80-
- Submit Consent By ConsentToken
81-
- Get Consent Logs
82-
- Submit Consent By AccessToken
83-
- Verify Consent By AccessToken
84-
- Update Consent Profile By AccessToken
85-
- Get Consent Logs By Uid
86-
- Album With Cursor
87-
- Audio With Cursor
88-
- Check In With Cursor
89-
- Event With Cursor
90-
- Following With Cursor
91-
- Group With Cursor
92-
- Like With Cursor
93-
94-
95-
## Removed APIs:
96-
97-
- GetCompanies API
98-
- Getstatus API
38+
## This full version release includes major changes with several improvements and optimizations :
39+
- Enhanced the coding standards of SDK to follow industry programming styles and best practices.
40+
- Enhanced security standards of SDK.
41+
- Reduced code between the business layer and persistence layer for optimization of SDK performance.
42+
- Added internal parameter validations in the API function
43+
- ApiKey and ApiSecret usage redundancy removed
44+
- All LoginRadius related features need to be defined once only and SDK will handle them automatically
45+
- Improved the naming conventions of API functions for better readability.
46+
- Better Error and Exception Handling for LoginRadius API Response in SDK
47+
- Revamped complete SDK and restructured it with latest API function names and parameters
48+
- Added detailed description to API functions and parameters for better understanding
49+
- Updated the demo according to latest SDK changes
50+
- Implemented API Region Feature
51+
- Added Consent Management feature
52+
- Added PIN Authentication feature
9953

10054
# Version 10.0.0-beta
10155
## This beta version release includes major changes with several improvements and optimizations :
@@ -162,7 +116,7 @@ This full version release includes major breaking changes with several improveme
162116
- Refresh Token
163117
- Delete All Records by Datasource
164118

165-
### Breaking Changes
119+
###Breaking Changes
166120
- Replaced deprecated [pycrypto package](https://pypi.org/project/pycrypto/) with [cryptography package](https://pypi.org/project/cryptography/) for SOTT generation
167121
- Updated some existing API's:
168122
- Get Roles by UID: moved to role class

Demo/LoginRadius/api/account/account_api.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_privacy_policy_history_by_uid(self, uid):
3131
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
3232

3333
resource_path = "identity/v2/manage/account/" + uid + "/privacypolicy/history"
34-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
34+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
3535

3636
def create_account(self, account_create_model, fields=''):
3737
"""This API is used to create an account in Cloud Storage. This API bypass the normal email verification process and manually creates the user. <br><br>In order to use this API, you need to format a JSON request body with all of the mandatory fields
@@ -79,7 +79,7 @@ def get_account_profile_by_email(self, email, fields=''):
7979
query_parameters["fields"] = fields
8080

8181
resource_path = "identity/v2/manage/account"
82-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
82+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
8383

8484
def get_account_profile_by_user_name(self, user_name, fields=''):
8585
"""This API is used to retrieve all of the profile data associated with the specified account by user name in Cloud Storage.
@@ -104,7 +104,7 @@ def get_account_profile_by_user_name(self, user_name, fields=''):
104104
query_parameters["fields"] = fields
105105

106106
resource_path = "identity/v2/manage/account"
107-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
107+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
108108

109109
def get_account_profile_by_phone(self, phone, fields=''):
110110
"""This API is used to retrieve all of the profile data, associated with the account by phone number in Cloud Storage.
@@ -129,7 +129,7 @@ def get_account_profile_by_phone(self, phone, fields=''):
129129
query_parameters["fields"] = fields
130130

131131
resource_path = "identity/v2/manage/account"
132-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
132+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
133133

134134
def get_account_profile_by_uid(self, uid, fields=''):
135135
"""This API is used to retrieve all of the profile data, associated with the account by uid in Cloud Storage.
@@ -153,7 +153,7 @@ def get_account_profile_by_uid(self, uid, fields=''):
153153
query_parameters["fields"] = fields
154154

155155
resource_path = "identity/v2/manage/account/" + uid
156-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
156+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
157157

158158
def update_account_by_uid(self, account_user_profile_update_model, uid, fields='',
159159
null_support=None):
@@ -236,7 +236,7 @@ def get_account_password_hash_by_uid(self, uid):
236236
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
237237

238238
resource_path = "identity/v2/manage/account/" + uid + "/password"
239-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
239+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
240240

241241
def set_account_password_by_uid(self, password, uid):
242242
"""This API is used to set the password of an account in Cloud Storage.
@@ -285,7 +285,7 @@ def delete_account_by_uid(self, uid):
285285
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
286286

287287
resource_path = "identity/v2/manage/account/" + uid
288-
return self._lr_object.execute("DELETE", resource_path, query_parameters, None)
288+
return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
289289

290290
def invalidate_account_email_verification(self, uid, email_template='', verification_url=''):
291291
"""This API is used to invalidate the Email Verification status on an account.
@@ -312,7 +312,7 @@ def invalidate_account_email_verification(self, uid, email_template='', verifica
312312
query_parameters["verificationUrl"] = verification_url
313313

314314
resource_path = "identity/v2/manage/account/" + uid + "/invalidateemail"
315-
return self._lr_object.execute("PUT", resource_path, query_parameters, None)
315+
return self._lr_object.execute("PUT", resource_path, query_parameters, {})
316316

317317
def get_forgot_password_token(self, email, email_template=None, reset_password_url=None,
318318
send_email=None):
@@ -392,7 +392,7 @@ def get_access_token_by_uid(self, uid):
392392
query_parameters["uid"] = uid
393393

394394
resource_path = "identity/v2/manage/account/access_token"
395-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
395+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
396396

397397
def reset_phone_id_verification_by_uid(self, uid, sms_template=''):
398398
"""This API Allows you to reset the phone no verification of an end user’s account.
@@ -416,7 +416,7 @@ def reset_phone_id_verification_by_uid(self, uid, sms_template=''):
416416
query_parameters["smsTemplate"] = sms_template
417417

418418
resource_path = "identity/v2/manage/account/" + uid + "/invalidatephone"
419-
return self._lr_object.execute("PUT", resource_path, query_parameters, None)
419+
return self._lr_object.execute("PUT", resource_path, query_parameters, {})
420420

421421
def upsert_email(self, upsert_email_model, uid, fields=''):
422422
"""This API is used to add/upsert another emails in account profile by different-different email types. If the email type is same then it will simply update the existing email, otherwise it will add a new email in Email array.
@@ -496,7 +496,7 @@ def refresh_access_token_by_refresh_token(self, refresh__token):
496496
query_parameters["refresh_Token"] = refresh__token
497497

498498
resource_path = "identity/v2/manage/account/access_token/refresh"
499-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
499+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
500500

501501
def revoke_refresh_token(self, refresh__token):
502502
"""The Revoke Refresh Access Token API is used to revoke a refresh token or the Provider Access Token, revoking an existing refresh token will invalidate the refresh token but the associated access token will work until the expiry.
@@ -518,7 +518,7 @@ def revoke_refresh_token(self, refresh__token):
518518
query_parameters["refresh_Token"] = refresh__token
519519

520520
resource_path = "identity/v2/manage/account/access_token/refresh/revoke"
521-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
521+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
522522

523523
def get_account_identities_by_email(self, email, fields=''):
524524
"""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.
@@ -543,7 +543,7 @@ def get_account_identities_by_email(self, email, fields=''):
543543
query_parameters["fields"] = fields
544544

545545
resource_path = "identity/v2/manage/account/identities"
546-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
546+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
547547

548548
def account_delete_by_email(self, email):
549549
"""This API is used to delete all user profiles associated with an Email.
@@ -565,7 +565,7 @@ def account_delete_by_email(self, email):
565565
query_parameters["email"] = email
566566

567567
resource_path = "identity/v2/manage/account"
568-
return self._lr_object.execute("DELETE", resource_path, query_parameters, None)
568+
return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
569569

570570
def account_update_uid(self, update_uid_model, uid):
571571
"""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.

Demo/LoginRadius/api/account/role_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_roles_by_uid(self, uid):
3131
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
3232

3333
resource_path = "identity/v2/manage/account/" + uid + "/role"
34-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
34+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
3535

3636
def assign_roles_by_uid(self, account_roles_model, uid):
3737
"""This API is used to assign your desired roles to a given user.
@@ -100,7 +100,7 @@ def get_role_context_by_uid(self, uid):
100100
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
101101

102102
resource_path = "identity/v2/manage/account/" + uid + "/rolecontext"
103-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
103+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
104104

105105
def get_role_context_by_context_name(self, context_name):
106106
"""The API is used to retrieve role context by the context name.
@@ -121,7 +121,7 @@ def get_role_context_by_context_name(self, context_name):
121121
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
122122

123123
resource_path = "identity/v2/manage/account/rolecontext/" + context_name
124-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
124+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
125125

126126
def update_role_context_by_uid(self, account_role_context_model, uid):
127127
"""This API creates a Context with a set of Roles
@@ -170,7 +170,7 @@ def delete_role_context_by_uid(self, context_name, uid):
170170
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
171171

172172
resource_path = "identity/v2/manage/account/" + uid + "/rolecontext/" + context_name
173-
return self._lr_object.execute("DELETE", resource_path, query_parameters, None)
173+
return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
174174

175175
def delete_roles_from_role_context_by_uid(self, context_name, role_context_remove_role_model, uid):
176176
"""This API Deletes the specified Role from a Context.
@@ -241,7 +241,7 @@ def get_roles_list(self):
241241
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
242242

243243
resource_path = "identity/v2/manage/role"
244-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
244+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
245245

246246
def create_roles(self, roles_model):
247247
"""This API creates a role with permissions.
@@ -282,7 +282,7 @@ def delete_role(self, role):
282282
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
283283

284284
resource_path = "identity/v2/manage/role/" + role
285-
return self._lr_object.execute("DELETE", resource_path, query_parameters, None)
285+
return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
286286

287287
def add_role_permissions(self, permissions_model, role):
288288
"""This API is used to add permissions to a given role.

Demo/LoginRadius/api/account/sott_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def generate_sott(self, time_difference=None):
3030
query_parameters["timeDifference"] = time_difference
3131

3232
resource_path = "identity/v2/manage/account/sott"
33-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
33+
return self._lr_object.execute("GET", resource_path, query_parameters, {})

Demo/LoginRadius/api/advanced/configuration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ def get_server_info(self, time_difference=None):
4343
query_parameters["timeDifference"] = time_difference
4444

4545
resource_path = "identity/v2/serverinfo"
46-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
46+
return self._lr_object.execute("GET", resource_path, query_parameters, {})

Demo/LoginRadius/api/advanced/consentmanagement_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_consent_logs_by_uid(self, uid):
3131
query_parameters["apiSecret"] = self._lr_object.get_api_secret()
3232

3333
resource_path = "identity/v2/manage/account/" + uid + "/consent/logs"
34-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
34+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
3535

3636
def submit_consent_by_consent_token(self, consent_token, consent_submit_model):
3737
"""This API is to submit consent form using consent token.
@@ -76,7 +76,7 @@ def get_consent_logs(self, access_token):
7676
query_parameters["apiKey"] = self._lr_object.get_api_key()
7777

7878
resource_path = "identity/v2/auth/consent/logs"
79-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
79+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
8080

8181
def submit_consent_by_access_token(self, access_token, consent_submit_model):
8282
"""API to provide a way to end user to submit a consent form for particular event type.
@@ -128,7 +128,7 @@ def verify_consent_by_access_token(self, access_token, event, is_custom):
128128
query_parameters["isCustom"] = is_custom
129129

130130
resource_path = "identity/v2/auth/consent/verify"
131-
return self._lr_object.execute("GET", resource_path, query_parameters, None)
131+
return self._lr_object.execute("GET", resource_path, query_parameters, {})
132132

133133
def update_consent_profile_by_access_token(self, access_token, consent_update_model):
134134
"""This API is to update consents using access token.

0 commit comments

Comments
 (0)