From fe0ae6bbf92c3edc9911d2ea8859a5fe0180f7a7 Mon Sep 17 00:00:00 2001 From: Sudhanshu Agarwal Date: Mon, 30 Sep 2019 18:30:57 +0530 Subject: [PATCH] Version 10.0.0 --- CHANGELOG.md | 133 ++- README.md | 848 +++++++++++++++--- .../Api/Account/AccountApi.cs | 61 +- .../Api/Advanced/ConsentManagementApi.cs | 182 ++++ .../Advanced/MultiFactorAuthenticationApi.cs | 146 --- .../Api/Advanced/ReAuthenticationApi.cs | 284 ++++++ .../Api/Authentication/AuthenticationApi.cs | 56 +- .../Authentication/PINAuthenticationApi.cs | 375 ++++++++ .../Authentication/PhoneAuthenticationApi.cs | 68 +- .../Api/Social/NativeSocialApi.cs | 14 +- .../LoginRadiusSDK.V2/Api/Social/SocialApi.cs | 274 ++++-- .../Common/ApiExceptionResponse.cs | 9 +- .../LoginRadiusSDK.V2.csproj | 5 +- Source/LoginRadiusSDK.V2/LoginRadiusSDKV2.snk | Bin 0 -> 596 bytes .../Manager/ConnectionManager.cs | 7 +- .../Models/Enums/ConsentProfileActions.cs | 23 + .../Models/Enums/ConsentProfileUpdateType.cs | 23 + .../AccountUserProfileUpdateModel.cs | 7 - .../AuthUserRegistrationModel.cs | 18 +- .../{KloutProfile.cs => ChangePINModel.cs} | 16 +- .../Models/RequestModels/ConsentDataModel.cs | 31 + .../Models/RequestModels/ConsentEventModel.cs | 31 + .../RequestModels/ConsentSubmitModel.cs | 32 + .../RequestModels/ConsentUpdateModel.cs | 26 + .../EventBasedMultiFactorToken.cs | 25 + .../ForgotPINLinkByEmailModel.cs | 25 + .../ForgotPINLinkByUserNameModel.cs | 25 + .../RequestModels/ForgotPINOtpByPhoneModel.cs | 25 + .../Models/RequestModels/LoginByPINModel.cs | 25 + .../PINAuthEventBasedAuthModelWithLockout.cs | 25 + .../Models/RequestModels/PINModel.cs | 31 + .../Models/RequestModels/PINRequiredModel.cs | 25 + .../ResetPINByEmailAndOtpModel.cs | 37 + .../ResetPINByPhoneAndOTPModel.cs | 37 + .../RequestModels/ResetPINByResetToken.cs | 31 + .../ResetPINBySecurityQuestionAnswer.cs | 32 + ...INBySecurityQuestionAnswerAndEmailModel.cs | 25 + ...INBySecurityQuestionAnswerAndPhoneModel.cs | 25 + ...ySecurityQuestionAnswerAndUsernameModel.cs | 25 + .../ResetPINByUsernameAndOtpModel.cs | 37 + .../Models/RequestModels/UpdateUidModel.cs | 25 + .../RequestModels/UserProfileUpdateModel.cs | 20 +- .../Models/ResponseModels/AccessToken.cs | 12 + .../ConsentLogsResponseModel.cs | 32 + .../Models/ResponseModels/ConsentOption.cs | 32 + .../Models/ResponseModels/ConsentProfile.cs | 32 + .../ResponseModels/ConsentProfileLog.cs | 32 + .../ResponseModels/ConsentProfileLogs.cs | 70 ++ .../ConsentProfileValidResponse.cs | 31 + .../Models/ResponseModels/ConsentVersions.cs | 37 + .../OtherObjects/DeleteResponse.cs | 6 + .../OtherObjects/PINInformation.cs | 44 + .../UserProfile/Objects/DataValue.cs | 31 + .../UserProfile/Objects/RegistrationData.cs | 26 + .../Objects/RegistrationDataValueObject.cs | 25 + .../ResponseModels/UserProfile/UserProfile.cs | 25 + 56 files changed, 3123 insertions(+), 481 deletions(-) create mode 100644 Source/LoginRadiusSDK.V2/Api/Advanced/ConsentManagementApi.cs create mode 100644 Source/LoginRadiusSDK.V2/Api/Advanced/ReAuthenticationApi.cs create mode 100644 Source/LoginRadiusSDK.V2/Api/Authentication/PINAuthenticationApi.cs create mode 100644 Source/LoginRadiusSDK.V2/LoginRadiusSDKV2.snk create mode 100644 Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileActions.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileUpdateType.cs rename Source/LoginRadiusSDK.V2/Models/RequestModels/{KloutProfile.cs => ChangePINModel.cs} (59%) create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentDataModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentEventModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentSubmitModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentUpdateModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/EventBasedMultiFactorToken.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByEmailModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByUserNameModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINOtpByPhoneModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/LoginByPINModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/PINAuthEventBasedAuthModelWithLockout.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/PINModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/PINRequiredModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByEmailAndOtpModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByPhoneAndOTPModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByResetToken.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswer.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndEmailModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndPhoneModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndUsernameModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByUsernameAndOtpModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/RequestModels/UpdateUidModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentLogsResponseModel.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentOption.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfile.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLog.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLogs.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileValidResponse.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentVersions.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PINInformation.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/DataValue.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationData.cs create mode 100644 Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationDataValueObject.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index b78db35..a82a93f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,83 @@ > **LoginRadius .NET SDK Change Log** provides information regarding what has changed, more specifically what changes, improvements and bug fix has been made to the SDK. For more details please refer to the [LoginRadius API Documention](https://docs.loginradius.com/api/v2/sdk-libraries/aspnet) -### Version 10.0.0-beta -Release on **August 5, 2019** +# Version 10.0.0 +Release on **September 30, 2019** + +## Enhancements +This full version release includes major changes with several improvements and optimizations : + +- Enhanced the coding standards of SDK to follow industry programming styles and best practices. +- Enhanced security standards of SDK. +- Reduced code between the business layer and persistence layer for optimization of SDK performance. +- Added internal parameter validations in the API function. +- ApiKey and ApiSecret usage redundancy removed. +- All LoginRadius related features need to be defined once only and SDK will handle them automatically. +- Improved the naming conventions of API functions for better readability. +- Better Error and Exception Handling for LoginRadius API Response in SDK. +- Revamped complete SDK and restructured it with latest API function names and parameters. +- Added detailed description to API functions and parameters for better understanding. +- Updated the demo according to latest SDK changes. +- Implemented API Region Feature. +- Handled additional Data coming in error response of API. +- Handled Password less proxy credentials settings. +- Strong Name Signed the library. + + +## Added new multiple APIs for better user experience + + - Update Phone ID by UID + - Upsert Email + - Role Context profile + - MFA Resend OTP + - User Registration By Captcha + - Get Access Token via Linkedin Token + - Get Access Token By Foursquare Access Token + - Get Active Session By Account Id + - Get Active Session By Profile Id + - Delete User Profiles By Email + - Verify Multifactor OTP Authentication + - Verify Multifactor Password Authentication + - Verify Multifactor PIN Authentication + - Update UID + - MFA Re-authentication by PIN + - Pin Login + - Forgot Pin By Email + - Forgot Pin By UserName + - Reset PIN By ResetToken + - Reset PIN By SecurityAnswer And Email + - Reset PIN By SecurityAnswer And Username + - Reset PIN By SecurityAnswer And Phone + - Forgot Pin By Phone + - Change Pin By Token + - Reset PIN by Phone and OTP + - Reset PIN by Email and OTP + - Reset PIN by Username and OTP + - Set Pin By PinAuthToken + - Invalidate Pin Session Token + - Submit Consent By ConsentToken + - Get Consent Logs + - Submit Consent By AccessToken + - Verify Consent By AccessToken + - Update Consent Profile By AccessToken + - Get Consent Logs By Uid + - Album With Cursor + - Audio With Cursor + - Check In With Cursor + - Event With Cursor + - Following With Cursor + - Group With Cursor + - Like With Cursor + + +## Removed APIs: + +- GetCompanies API +- Getstatus API -##### Enhancements +# Version 10.0.0-beta +Release on **August 5, 2019** +## Enhancements This beta version release includes major changes with several improvements and optimizations : - Enhanced the coding standards of SDK to follow industry programming styles and best practices. @@ -21,7 +94,7 @@ This beta version release includes major changes with several improvements and o - Implemented API Region Feature. -##### Added new multiple APIs for better user experience +## Added new multiple APIs for better user experience - Update Phone ID by UID - Upsert Email @@ -34,16 +107,16 @@ This beta version release includes major changes with several improvements and o - Get Active Session By Profile Id -##### Removed APIs: +## Removed APIs: - GetCompanies API -### Version 5.2.0 +# Version 5.2.0 Release on **January 15, 2019** > **Note: The version contains several breaking changes.** -##### Enhancements +## Enhancements - SDK has been re-structured to match the structure of the LoginRadius API Docs - Several method names have had their spelling errors fixed @@ -52,10 +125,10 @@ Release on **January 15, 2019** - A variable named domainName is now defined in the configurations that allow the user to define a custom API domain - The Multifactor re-authentication APIs are now included within the SDK -### Version 5.1.0 +# Version 5.1.0 Release on **August 13, 2018** -##### Enhancements +## Enhancements - Added Access Token on Registration Event. - Simplified API Request Signing without API secret. @@ -83,41 +156,41 @@ Release on **August 13, 2018** - Added apis to update MFA settings and MFA Authentication by Access token and to verify MFA by backup code. - Apis to validate MFA by Google authentication code, OTP, Backup code and password are added. -##### Bug Fixes +## Bug Fixes - Fixed http method naming convention issue. - Fixed serialization related issue in datetime parsing from .net to javascript. -### Version 5.0.3 +# Version 5.0.3 Release on **April 26, 2018** -##### Enhancements +## Enhancements - Server validation error model add to the "RestException" - **username** param add to GetForgotPasswordToken - dependency update -### Version 5.0.2 +# Version 5.0.2 Release on **Jan 22, 2018** -##### Enhancements +## Enhancements - Added partial and full replace option to custom object update API. -### Version 5.0.1 +# Version 5.0.1 Release on **Jan 12, 2018** -##### Bug Fixes +## Bug Fixes - Parsing issue fixed in custom object API. -### Version 5.0.0 +# Version 5.0.0 Release on **Nov 21, 2017** > **Note: The version contains several breaking changes.** -##### Enhancements +## Enhancements - Significantly improved code performance. - Project Moved to .NetStandard to target NetFramework and NetCore build or framework. @@ -125,21 +198,21 @@ Release on **Nov 21, 2017** - New LoginRadius API changes add, includes various APIs and new response properties. - Namespaces and method refactor. -### Version 4.0.4 +# Version 4.0.4 Release on **Nov 1, 2017** -##### Enhancements +## Enhancements - Significantly improved code performance. - Added a new LoginRadius JS driven sample project. -##### Bug Fixes +## Bug Fixes - Config read fix - SOTT build fix -### Version 4.0.2 +# Version 4.0.2 Released on **May 25, 2017** - Bug Fixes. @@ -147,16 +220,16 @@ Released on **May 25, 2017** - See the documentation [here](https://docs.loginradius.com/api/v2/sdk-libraries/aspnet) -### Version 4.0.1 +# Version 4.0.1 Released on **May 15, 2017** - Bug Fixes. -### Version 4.0.0 +# Version 4.0.0 Released on **May 15, 2017** -##### Enhancements +## Enhancements Updated with V2 APIs - Added new multiple APIs for better user experience. @@ -172,10 +245,10 @@ Updated with V2 APIs - Add Role Context and additional permission APIs -### Version 3.1.1 +# Version 3.1.1 Released on **June 27, 2016** -##### Enhancements +## Enhancements - Significantly improved code performance. - Added new data fields to LoginRadius user profile. @@ -185,15 +258,15 @@ Released on **June 27, 2016** - Some new LoginRadius custom object APIs added. - Handled network connection error and failures. -##### Bug Fixes +## Bug Fixes - Custom Object Upsert bug fix. -### Version 3.1.2 +# Version 3.1.2 Released on **March 15, 2017** -##### Bug Fixes +## Bug Fixes - Added missing parameter in register API. - Added email verification diff --git a/README.md b/README.md index e313a66..e6f5b38 100755 --- a/README.md +++ b/README.md @@ -167,7 +167,6 @@ List of APIs in this Section:
[POST : Auth Login by Username](#LoginByUserName-post-)
[POST : Auth Forgot Password](#ForgotPassword-post-)
[POST : Auth User Registration by Email](#UserRegistrationByEmail-post-)
-[POST : Phone User Registration by SMS](#UserRegistrationByPhone-post-)
[POST : Auth User Registration By Captcha](#UserRegistrationByCaptcha-post-)
[GET : Get Security Questions By Email](#GetSecurityQuestionsByEmail-get-)
[GET : Get Security Questions By UserName](#GetSecurityQuestionsByUserName-get-)
@@ -495,29 +494,6 @@ var apiResponse = new AuthenticationApi().UserRegistrationByEmail(authUserRegist ``` -
Phone User Registration by SMS (POST)
-This API registers the new users into your Cloud Storage and triggers the phone verification process. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-user-registration-by-sms) - - - -``` - -AuthUserRegistrationModel authUserRegistrationModel = new AuthUserRegistrationModel{ -FirstName ="", -LastName ="", -Password ="", -PhoneId ="" -}; //Required -var sott = "sott"; //Required -string fields = null; //Optional -var options = "options"; //Optional -var smsTemplate = "smsTemplate"; //Optional -var verificationUrl = "verificationUrl"; //Optional -var welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional -var apiResponse = new AuthenticationApi().UserRegistrationByPhone(authUserRegistrationModel, sott, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate); -``` - -
Auth User Registration By Captcha (POST)
This API creates a user in the database as well as sends a verification email to the user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-user-registration-by-recaptcha) @@ -802,6 +778,7 @@ List of APIs in this Section:
[PUT : Account Invalidate Verification Email](#InvalidateAccountEmailVerification-put-)
[PUT : Reset phone ID verification](#ResetPhoneIDVerificationByUid-put-)
[PUT : Upsert Email](#UpsertEmail-put-)
+[PUT : Update UID](#AccountUpdateUid-put-)
[POST : Account Create](#CreateAccount-post-)
[POST : Forgot Password token](#GetForgotPasswordToken-post-)
[POST : Email Verification token](#GetEmailVerificationToken-post-)
@@ -817,6 +794,7 @@ List of APIs in this Section:
[GET : Account Identities by Email](#GetAccountIdentitiesByEmail-get-)
[DELETE : Account Delete](#DeleteAccountByUid-delete-)
[DELETE : Account Remove Email](#RemoveEmail-delete-)
+[DELETE : Delete User Profiles By Email](#AccountDeleteByEmail-delete-)
@@ -912,6 +890,21 @@ var apiResponse = new AccountApi().UpsertEmail(upsertEmailModel, uid, fields); ``` +
Update UID (PUT)
+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. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-update/) + + + +``` + +UpdateUidModel updateUidModel = new UpdateUidModel{ +NewUid ="" +}; //Required +var uid = "uid"; //Required +var apiResponse = new AccountApi().AccountUpdateUid(updateUidModel, uid); +``` + +
Account Create (POST)
This API is used to create an account in Cloud Storage. This API bypass the normal email verification process and manually creates the user.

In order to use this API, you need to format a JSON request body with all of the mandatory fields [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-create) @@ -1112,6 +1105,18 @@ var apiResponse = new AccountApi().RemoveEmail(email, uid, fields); ``` +
Delete User Profiles By Email (DELETE)
+This API is used to delete all user profiles associated with an Email. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-email-delete/) + + + +``` + +var email = "email"; //Required +var apiResponse = new AccountApi().AccountDeleteByEmail(email); +``` + + @@ -1132,18 +1137,24 @@ List of APIs in this Section:
[GET : Get Active Session By Account Id](#GetActiveSessionByAccountID-get-)
[GET : Get Active Session By Profile Id](#GetActiveSessionByProfileID-get-)
[GET : Album](#GetAlbums-get-)
+[GET : Get Albums with cursor](#GetAlbumsWithCursor-get-)
[GET : Audio](#GetAudios-get-)
+[GET : Get Audio With Cursor](#GetAudiosWithCursor-get-)
[GET : Check In](#GetCheckIns-get-)
+[GET : Get CheckIns With Cursor](#GetCheckInsWithCursor-get-)
[GET : Contact](#GetContacts-get-)
[GET : Event](#GetEvents-get-)
+[GET : Get Events With Cursor](#GetEventsWithCursor-get-)
[GET : Following](#GetFollowings-get-)
+[GET : Get Followings With Cursor](#GetFollowingsWithCursor-get-)
[GET : Group](#GetGroups-get-)
+[GET : Get Groups With Cursor](#GetGroupsWithCursor-get-)
[GET : Like](#GetLikes-get-)
+[GET : Get Likes With Cursor](#GetLikesWithCursor-get-)
[GET : Mention](#GetMentions-get-)
[GET : Page](#GetPage-get-)
[GET : Photo](#GetPhotos-get-)
[GET : Get Post](#GetPosts-get-)
-[GET : Get Status](#GetStatus-get-)
[GET : Get Trackable Status Stats](#GetTrackableStatusStats-get-)
[GET : Trackable Status Fetching](#TrackableStatusFetching-get-)
[GET : User Profile](#GetSocialUserProfile-get-)
@@ -1153,7 +1164,7 @@ List of APIs in this Section:
Post Message API (POST)
-Post Message API is used to post messages to the user’s contacts.

Supported Providers: Twitter, LinkedIn

The Message API is used to post messages to the user’s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.

GET & POST Message API work the same way except the API method is different [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post-message-api) +Post Message API is used to post messages to the user's contacts.

Supported Providers: Twitter, LinkedIn

The Message API is used to post messages to the user?s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.

GET & POST Message API work the same way except the API method is different [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post-message-api) @@ -1168,7 +1179,7 @@ var apiResponse = new SocialApi().PostMessage(accessToken, message, subject, to)
Status Posting (POST)
-The Status API is used to update the status on the user’s wall.

Supported Providers: Facebook, Twitter, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/status-posting/) +The Status API is used to update the status on the user's wall.

Supported Providers: Facebook, Twitter, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/status-posting/) @@ -1187,7 +1198,7 @@ var apiResponse = new SocialApi().StatusPosting(accessToken, caption, descriptio
Trackable Status Posting (POST)
-The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user’s wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.

POST Input Parameter Format: application/x-www-form-urlencoded [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/trackable-status-posting/) +The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.

POST Input Parameter Format: application/x-www-form-urlencoded [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/trackable-status-posting/) @@ -1303,8 +1314,21 @@ var apiResponse = new SocialApi().GetAlbums(accessToken); ``` +
Get Albums with cursor (GET)
+Supported Providers: Facebook, Google, Live, Vkontakte.

This API returns the photo albums associated with the passed in access tokens Social Profile. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/album/) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetAlbumsWithCursor(accessToken, nextCursor); +``` + +
Audio (GET)
-The Audio API is used to get audio files data from the user’s social account.

Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio) +The Audio API is used to get audio files data from the user's social account.

Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio) @@ -1315,8 +1339,21 @@ var apiResponse = new SocialApi().GetAudios(accessToken); ``` +
Get Audio With Cursor (GET)
+The Audio API is used to get audio files data from the user's social account.

Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetAudiosWithCursor(accessToken, nextCursor); +``` + +
Check In (GET)
-The Check In API is used to get check Ins data from the user’s social account.

Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in) +The Check In API is used to get check Ins data from the user's social account.

Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in) @@ -1327,8 +1364,21 @@ var apiResponse = new SocialApi().GetCheckIns(accessToken); ``` +
Get CheckIns With Cursor (GET)
+The Check In API is used to get check Ins data from the user's social account.

Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetCheckInsWithCursor(accessToken, nextCursor); +``` + +
Contact (GET)
-The Contact API is used to get contacts/friends/connections data from the user’s social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius’ standard data format. This API requires setting permissions in your LoginRadius Dashboard.

Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.

Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/contact) +The Contact API is used to get contacts/friends/connections data from the user's social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius' standard data format. This API requires setting permissions in your LoginRadius Dashboard.

Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.

Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/contact) @@ -1341,7 +1391,7 @@ var apiResponse = new SocialApi().GetContacts(accessToken, nextCursor);
Event (GET)
-The Event API is used to get the event data from the user’s social account.

Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event) +The Event API is used to get the event data from the user's social account.

Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event) @@ -1352,8 +1402,21 @@ var apiResponse = new SocialApi().GetEvents(accessToken); ``` +
Get Events With Cursor (GET)
+The Event API is used to get the event data from the user's social account.

Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetEventsWithCursor(accessToken, nextCursor); +``` + +
Following (GET)
-Get the following user list from the user’s social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following) +Get the following user list from the user's social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following) @@ -1364,8 +1427,21 @@ var apiResponse = new SocialApi().GetFollowings(accessToken); ``` +
Get Followings With Cursor (GET)
+Get the following user list from the user's social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetFollowingsWithCursor(accessToken, nextCursor); +``` + +
Group (GET)
-The Group API is used to get group data from the user’s social account.

Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group) +The Group API is used to get group data from the user's social account.

Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group) @@ -1376,8 +1452,21 @@ var apiResponse = new SocialApi().GetGroups(accessToken); ``` +
Get Groups With Cursor (GET)
+The Group API is used to get group data from the user's social account.

Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetGroupsWithCursor(accessToken, nextCursor); +``` + +
Like (GET)
-The Like API is used to get likes data from the user’s social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like) +The Like API is used to get likes data from the user's social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like) @@ -1388,8 +1477,21 @@ var apiResponse = new SocialApi().GetLikes(accessToken); ``` +
Get Likes With Cursor (GET)
+The Like API is used to get likes data from the user's social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like) + + + +``` + +var accessToken = "accessToken"; //Required +var nextCursor = "nextCursor"; //Required +var apiResponse = new SocialApi().GetLikesWithCursor(accessToken, nextCursor); +``` + +
Mention (GET)
-The Mention API is used to get mentions data from the user’s social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/mention) +The Mention API is used to get mentions data from the user's social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/mention) @@ -1401,7 +1503,7 @@ var apiResponse = new SocialApi().GetMentions(accessToken);
Page (GET)
-The Page API is used to get the page data from the user’s social account.

Supported Providers: Facebook, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/page) +The Page API is used to get the page data from the user's social account.

Supported Providers: Facebook, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/page) @@ -1414,7 +1516,7 @@ var apiResponse = new SocialApi().GetPage(accessToken, pageName);
Photo (GET)
-The Photo API is used to get photo data from the user’s social account.

Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/photo) +The Photo API is used to get photo data from the user's social account.

Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/photo) @@ -1427,7 +1529,7 @@ var apiResponse = new SocialApi().GetPhotos(accessToken, albumId);
Get Post (GET)
-The Post API is used to get post message data from the user’s social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post) +The Post API is used to get post message data from the user's social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post) @@ -1438,20 +1540,8 @@ var apiResponse = new SocialApi().GetPosts(accessToken); ``` -
Get Status (GET)
-The Status API is used to get the status messages from the user’s social account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/status-fetching) - - - -``` - -var accessToken = "accessToken"; //Required -var apiResponse = new SocialApi().GetStatus(accessToken); -``` - -
Get Trackable Status Stats (GET)
-The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user’s wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/get-trackable-status-stats/) +The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/get-trackable-status-stats/) @@ -1481,7 +1571,7 @@ var apiResponse = new SocialApi().TrackableStatusFetching(postId);
User Profile (GET)
-The User Profile API is used to get social profile data from the user’s social account after authentication.

Supported Providers: All [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/user-profile) +The User Profile API is used to get social profile data from the user's social account after authentication.

Supported Providers: All [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/user-profile) @@ -1494,7 +1584,7 @@ var apiResponse = new SocialApi().GetSocialUserProfile(accessToken, fields);
Refresh User Profile (GET)
-The User Profile API is used to get the latest updated social profile data from the user’s social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius’ standard data format. This API should be called using the access token retrieved from the refresh access token API. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-user-profile) +The User Profile API is used to get the latest updated social profile data from the user's social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius' standard data format. This API should be called using the access token retrieved from the refresh access token API. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-user-profile) @@ -1507,7 +1597,7 @@ var apiResponse = new SocialApi().GetRefreshedSocialUserProfile(accessToken, fie
Video (GET)
-The Video API is used to get video files data from the user’s social account.

Supported Providers: Facebook, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/video) +The Video API is used to get video files data from the user's social account.

Supported Providers: Facebook, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/video) @@ -1715,6 +1805,7 @@ List of APIs in this Section:
[POST : Phone Forgot Password by OTP](#ForgotPasswordByPhoneOTP-post-)
[POST : Phone Resend Verification OTP](#PhoneResendVerificationOTP-post-)
[POST : Phone Resend Verification OTP By Token](#PhoneResendVerificationOTPByToken-post-)
+[POST : Phone User Registration by SMS](#UserRegistrationByPhone-post-)
[GET : Phone Number Availability](#CheckPhoneNumberAvailability-get-)
[DELETE : Remove Phone ID by Access Token](#RemovePhoneIDByAccessToken-delete-)
@@ -1837,6 +1928,29 @@ var apiResponse = new PhoneAuthenticationApi().PhoneResendVerificationOTPByToken ``` +
Phone User Registration by SMS (POST)
+This API registers the new users into your Cloud Storage and triggers the phone verification process. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-user-registration-by-sms) + + + +``` + +AuthUserRegistrationModel authUserRegistrationModel = new AuthUserRegistrationModel{ +FirstName ="", +LastName ="", +Password ="", +PhoneId ="" +}; //Required +var sott = "sott"; //Required +string fields = null; //Optional +var options = "options"; //Optional +var smsTemplate = "smsTemplate"; //Optional +var verificationUrl = "verificationUrl"; //Optional +var welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional +var apiResponse = new PhoneAuthenticationApi().UserRegistrationByPhone(authUserRegistrationModel, sott, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate); +``` + +
Phone Number Availability (GET)
This API is used to check the Phone Number exists or not on your site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-number-availability) @@ -1877,10 +1991,6 @@ List of APIs in this Section:
[PUT : MFA Validate Google Auth Code](#MFAValidateGoogleAuthCode-put-)
[PUT : MFA Validate Backup code](#MFAValidateBackupCode-put-)
[PUT : MFA Update Phone Number](#MFAUpdatePhoneNumber-put-)
-[PUT : Validate MFA by OTP](#MFAReAuthenticateByOTP-put-)
-[PUT : Validate MFA by Backup Code](#MFAReAuthenticateByBackupCode-put-)
-[PUT : Validate MFA by Google Authenticator Code](#MFAReAuthenticateByGoogleAuth-put-)
-[PUT : Validate MFA by Password](#MFAReAuthenticateByPassword-put-)
[POST : MFA Email Login](#MFALoginByEmail-post-)
[POST : MFA UserName Login](#MFALoginByUserName-post-)
[POST : MFA Phone Login](#MFALoginByPhone-post-)
@@ -1888,7 +1998,6 @@ List of APIs in this Section:
[GET : MFA Backup Code by Access Token](#MFABackupCodeByAccessToken-get-)
[GET : Reset Backup Code by Access Token](#MFAResetBackupCodeByAccessToken-get-)
[GET : MFA Resend Otp](#MFAResendOTP-get-)
-[GET : Multi Factor Re-Authenticate](#MFAReAuthenticate-get-)
[GET : MFA Backup Code by UID](#MFABackupCodeByUid-get-)
[GET : MFA Reset Backup Code by UID](#MFAResetBackupCodeByUid-get-)
[DELETE : MFA Reset Google Authenticator by Token](#MFAResetGoogleAuthByToken-delete-)
@@ -2007,67 +2116,6 @@ var apiResponse = new MultiFactorAuthenticationApi().MFAUpdatePhoneNumber(phoneN ``` -
Validate MFA by OTP (PUT)
-This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-otp) - - - -``` - -var accessToken = "accessToken"; //Required -ReauthByOtpModel reauthByOtpModel = new ReauthByOtpModel{ -Otp ="" -}; //Required -var apiResponse = new MultiFactorAuthenticationApi().MFAReAuthenticateByOTP(accessToken, reauthByOtpModel); -``` - - -
Validate MFA by Backup Code (PUT)
-This API is used to re-authenticate by set of backup codes via access_token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-backup-code) - - - -``` - -var accessToken = "accessToken"; //Required -ReauthByBackupCodeModel reauthByBackupCodeModel = new ReauthByBackupCodeModel{ -BackupCode ="" -}; //Required -var apiResponse = new MultiFactorAuthenticationApi().MFAReAuthenticateByBackupCode(accessToken, reauthByBackupCodeModel); -``` - - -
Validate MFA by Google Authenticator Code (PUT)
-This API is used to re-authenticate via Multi-factor-authentication by passing the google authenticator code [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-google-authenticator-code) - - - -``` - -var accessToken = "accessToken"; //Required -ReauthByGoogleAuthenticatorCodeModel reauthByGoogleAuthenticatorCodeModel = new ReauthByGoogleAuthenticatorCodeModel{ -GoogleAuthenticatorCode ="" -}; //Required -var apiResponse = new MultiFactorAuthenticationApi().MFAReAuthenticateByGoogleAuth(accessToken, reauthByGoogleAuthenticatorCodeModel); -``` - - -
Validate MFA by Password (PUT)
-This API is used to re-authenticate via Multi-factor-authentication by passing the password [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-password) - - - -``` - -var accessToken = "accessToken"; //Required -PasswordEventBasedAuthModelWithLockout passwordEventBasedAuthModelWithLockout = new PasswordEventBasedAuthModelWithLockout{ -Password ="" -}; //Required -var smsTemplate2FA = "smsTemplate2FA"; //Optional -var apiResponse = new MultiFactorAuthenticationApi().MFAReAuthenticateByPassword(accessToken, passwordEventBasedAuthModelWithLockout, smsTemplate2FA); -``` - -
MFA Email Login (POST)
This API can be used to login by emailid on a Multi-factor authentication enabled LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-email-login) @@ -2175,19 +2223,6 @@ var apiResponse = new MultiFactorAuthenticationApi().MFAResendOTP(secondFactorAu ``` -
Multi Factor Re-Authenticate (GET)
-This API is used to trigger the Multi-Factor Autentication workflow for the provided access_token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-trigger/) - - - -``` - -var accessToken = "accessToken"; //Required -var smsTemplate2FA = "smsTemplate2FA"; //Optional -var apiResponse = new MultiFactorAuthenticationApi().MFAReAuthenticate(accessToken, smsTemplate2FA); -``` - -
MFA Backup Code by UID (GET)
This API is used to reset the backup codes on a given account via the UID. This API call will generate 10 new codes, each code can only be consumed once. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-uid/) @@ -2269,6 +2304,533 @@ var apiResponse = new MultiFactorAuthenticationApi().MFAResetGoogleAuthenticator +### PINAuthentication API + + +List of APIs in this Section:
+[PUT : Reset PIN By ResetToken](#ResetPINByResetToken-put-)
+[PUT : Reset PIN By SecurityAnswer And Email](#ResetPINByEmailAndSecurityAnswer-put-)
+[PUT : Reset PIN By SecurityAnswer And Username](#ResetPINByUsernameAndSecurityAnswer-put-)
+[PUT : Reset PIN By SecurityAnswer And Phone](#ResetPINByPhoneAndSecurityAnswer-put-)
+[PUT : Change PIN By Token](#ChangePINByAccessToken-put-)
+[PUT : Reset PIN by Phone and OTP](#ResetPINByPhoneAndOtp-put-)
+[PUT : Reset PIN by Email and OTP](#ResetPINByEmailAndOtp-put-)
+[PUT : Reset PIN by Username and OTP](#ResetPINByUsernameAndOtp-put-)
+[POST : PIN Login](#PINLogin-post-)
+[POST : Forgot PIN By Email](#SendForgotPINEmailByEmail-post-)
+[POST : Forgot PIN By UserName](#SendForgotPINEmailByUsername-post-)
+[POST : Forgot PIN By Phone](#SendForgotPINSMSByPhone-post-)
+[POST : Set PIN By PinAuthToken](#SetPINByPinAuthToken-post-)
+[GET : Invalidate PIN Session Token](#InValidatePinSessionToken-get-)
+ + + +
Reset PIN By ResetToken (PUT)
+This API is used to reset pin using reset token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-resettoken/) + + + +``` + +ResetPINByResetToken resetPINByResetToken = new ResetPINByResetToken{ +PIN ="", +ResetToken ="" +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByResetToken(resetPINByResetToken); +``` + + +
Reset PIN By SecurityAnswer And Email (PUT)
+This API is used to reset pin using security question answer and email. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-email/) + + + +``` + +ResetPINBySecurityQuestionAnswerAndEmailModel resetPINBySecurityQuestionAnswerAndEmailModel = new ResetPINBySecurityQuestionAnswerAndEmailModel{ +Email ="", +PIN ="", +SecurityAnswer = new Dictionary{ +["QuestionID"] = "Answer" +} +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByEmailAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndEmailModel); +``` + + +
Reset PIN By SecurityAnswer And Username (PUT)
+This API is used to reset pin using security question answer and username. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-username/) + + + +``` + +ResetPINBySecurityQuestionAnswerAndUsernameModel resetPINBySecurityQuestionAnswerAndUsernameModel = new ResetPINBySecurityQuestionAnswerAndUsernameModel{ +PIN ="", +SecurityAnswer = new Dictionary{ +["QuestionID"] = "Answer" +}, +Username ="" +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByUsernameAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndUsernameModel); +``` + + +
Reset PIN By SecurityAnswer And Phone (PUT)
+This API is used to reset pin using security question answer and phone. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-phone/) + + + +``` + +ResetPINBySecurityQuestionAnswerAndPhoneModel resetPINBySecurityQuestionAnswerAndPhoneModel = new ResetPINBySecurityQuestionAnswerAndPhoneModel{ +Phone ="", +PIN ="", +SecurityAnswer = new Dictionary{ +["QuestionID"] = "Answer" +} +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByPhoneAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndPhoneModel); +``` + + +
Change PIN By Token (PUT)
+This API is used to change a user's PIN using access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/change-pin-by-access-token/) + + + +``` + +var accessToken = "accessToken"; //Required +ChangePINModel changePINModel = new ChangePINModel{ +NewPIN ="", +OldPIN ="" +}; //Required +var apiResponse = new PINAuthenticationApi().ChangePINByAccessToken(accessToken, changePINModel); +``` + + +
Reset PIN by Phone and OTP (PUT)
+This API is used to reset pin using phoneId and OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-phone-and-otp/) + + + +``` + +ResetPINByPhoneAndOTPModel resetPINByPhoneAndOTPModel = new ResetPINByPhoneAndOTPModel{ +Otp ="", +Phone ="", +PIN ="" +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByPhoneAndOtp(resetPINByPhoneAndOTPModel); +``` + + +
Reset PIN by Email and OTP (PUT)
+This API is used to reset pin using email and OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-email-and-otp/) + + + +``` + +ResetPINByEmailAndOtpModel resetPINByEmailAndOtpModel = new ResetPINByEmailAndOtpModel{ +Email ="", +Otp ="", +PIN ="" +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByEmailAndOtp(resetPINByEmailAndOtpModel); +``` + + +
Reset PIN by Username and OTP (PUT)
+This API is used to reset pin using username and OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-username-and-otp/) + + + +``` + +ResetPINByUsernameAndOtpModel resetPINByUsernameAndOtpModel = new ResetPINByUsernameAndOtpModel{ +Otp ="", +PIN ="", +Username ="" +}; //Required +var apiResponse = new PINAuthenticationApi().ResetPINByUsernameAndOtp(resetPINByUsernameAndOtpModel); +``` + + +
PIN Login (POST)
+This API is used to login a user by pin and session_token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/login-by-pin/) + + + +``` + +LoginByPINModel loginByPINModel = new LoginByPINModel{ +PIN ="" +}; //Required +var sessionToken = "sessionToken"; //Required +var apiResponse = new PINAuthenticationApi().PINLogin(loginByPINModel, sessionToken); +``` + + +
Forgot PIN By Email (POST)
+This API sends the reset pin email to specified email address. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-email/) + + + +``` + +ForgotPINLinkByEmailModel forgotPINLinkByEmailModel = new ForgotPINLinkByEmailModel{ +Email ="" +}; //Required +var emailTemplate = "emailTemplate"; //Optional +var resetPINUrl = "resetPINUrl"; //Optional +var apiResponse = new PINAuthenticationApi().SendForgotPINEmailByEmail(forgotPINLinkByEmailModel, emailTemplate, resetPINUrl); +``` + + +
Forgot PIN By UserName (POST)
+This API sends the reset pin email using username. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-username/) + + + +``` + +ForgotPINLinkByUserNameModel forgotPINLinkByUserNameModel = new ForgotPINLinkByUserNameModel{ +UserName ="" +}; //Required +var emailTemplate = "emailTemplate"; //Optional +var resetPINUrl = "resetPINUrl"; //Optional +var apiResponse = new PINAuthenticationApi().SendForgotPINEmailByUsername(forgotPINLinkByUserNameModel, emailTemplate, resetPINUrl); +``` + + +
Forgot PIN By Phone (POST)
+This API sends the OTP to specified phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-phone/) + + + +``` + +ForgotPINOtpByPhoneModel forgotPINOtpByPhoneModel = new ForgotPINOtpByPhoneModel{ +Phone ="" +}; //Required +var smsTemplate = "smsTemplate"; //Optional +var apiResponse = new PINAuthenticationApi().SendForgotPINSMSByPhone(forgotPINOtpByPhoneModel, smsTemplate); +``` + + +
Set PIN By PinAuthToken (POST)
+This API is used to change a user's PIN using Pin Auth token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/set-pin-by-pinauthtoken/) + + + +``` + +PINRequiredModel pinRequiredModel = new PINRequiredModel{ +PIN ="" +}; //Required +var pinAuthToken = "pinAuthToken"; //Required +var apiResponse = new PINAuthenticationApi().SetPINByPinAuthToken(pinRequiredModel, pinAuthToken); +``` + + +
Invalidate PIN Session Token (GET)
+This API is used to invalidate pin session token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/invalidate-pin-session-token/) + + + +``` + +var sessionToken = "sessionToken"; //Required +var apiResponse = new PINAuthenticationApi().InValidatePinSessionToken(sessionToken); +``` + + + + + + + +### ReAuthentication API + + +List of APIs in this Section:
+[PUT : Validate MFA by OTP](#MFAReAuthenticateByOTP-put-)
+[PUT : Validate MFA by Backup Code](#MFAReAuthenticateByBackupCode-put-)
+[PUT : Validate MFA by Google Authenticator Code](#MFAReAuthenticateByGoogleAuth-put-)
+[PUT : Validate MFA by Password](#MFAReAuthenticateByPassword-put-)
+[PUT : MFA Re-authentication by PIN](#VerifyPINAuthentication-put-)
+[POST : Verify Multifactor OTP Authentication](#VerifyMultiFactorOtpReauthentication-post-)
+[POST : Verify Multifactor Password Authentication](#VerifyMultiFactorPasswordReauthentication-post-)
+[POST : Verify Multifactor PIN Authentication](#VerifyMultiFactorPINReauthentication-post-)
+[GET : Multi Factor Re-Authenticate](#MFAReAuthenticate-get-)
+ + + +
Validate MFA by OTP (PUT)
+This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-otp/) + + + +``` + +var accessToken = "accessToken"; //Required +ReauthByOtpModel reauthByOtpModel = new ReauthByOtpModel{ +Otp ="" +}; //Required +var apiResponse = new ReAuthenticationApi().MFAReAuthenticateByOTP(accessToken, reauthByOtpModel); +``` + + +
Validate MFA by Backup Code (PUT)
+This API is used to re-authenticate by set of backup codes via access_token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-backup-code/) + + + +``` + +var accessToken = "accessToken"; //Required +ReauthByBackupCodeModel reauthByBackupCodeModel = new ReauthByBackupCodeModel{ +BackupCode ="" +}; //Required +var apiResponse = new ReAuthenticationApi().MFAReAuthenticateByBackupCode(accessToken, reauthByBackupCodeModel); +``` + + +
Validate MFA by Google Authenticator Code (PUT)
+This API is used to re-authenticate via Multi-factor-authentication by passing the google authenticator code [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-google-authenticator-code) + + + +``` + +var accessToken = "accessToken"; //Required +ReauthByGoogleAuthenticatorCodeModel reauthByGoogleAuthenticatorCodeModel = new ReauthByGoogleAuthenticatorCodeModel{ +GoogleAuthenticatorCode ="" +}; //Required +var apiResponse = new ReAuthenticationApi().MFAReAuthenticateByGoogleAuth(accessToken, reauthByGoogleAuthenticatorCodeModel); +``` + + +
Validate MFA by Password (PUT)
+This API is used to re-authenticate via Multi-factor-authentication by passing the password [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-password) + + + +``` + +var accessToken = "accessToken"; //Required +PasswordEventBasedAuthModelWithLockout passwordEventBasedAuthModelWithLockout = new PasswordEventBasedAuthModelWithLockout{ +Password ="" +}; //Required +var smsTemplate2FA = "smsTemplate2FA"; //Optional +var apiResponse = new ReAuthenticationApi().MFAReAuthenticateByPassword(accessToken, passwordEventBasedAuthModelWithLockout, smsTemplate2FA); +``` + + +
MFA Re-authentication by PIN (PUT)
+This API is used to validate the triggered MFA authentication flow with a password. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/pin/re-auth-by-pin/) + + + +``` + +var accessToken = "accessToken"; //Required +PINAuthEventBasedAuthModelWithLockout pinAuthEventBasedAuthModelWithLockout = new PINAuthEventBasedAuthModelWithLockout{ +PIN ="" +}; //Required +var smsTemplate2FA = "smsTemplate2FA"; //Optional +var apiResponse = new ReAuthenticationApi().VerifyPINAuthentication(accessToken, pinAuthEventBasedAuthModelWithLockout, smsTemplate2FA); +``` + + +
Verify Multifactor OTP Authentication (POST)
+This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-validate-mfa/) + + + +``` + +EventBasedMultiFactorToken eventBasedMultiFactorToken = new EventBasedMultiFactorToken{ +SecondFactorValidationToken ="" +}; //Required +var uid = "uid"; //Required +var apiResponse = new ReAuthenticationApi().VerifyMultiFactorOtpReauthentication(eventBasedMultiFactorToken, uid); +``` + + +
Verify Multifactor Password Authentication (POST)
+This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by password. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/re-auth-validate-password/) + + + +``` + +EventBasedMultiFactorToken eventBasedMultiFactorToken = new EventBasedMultiFactorToken{ +SecondFactorValidationToken ="" +}; //Required +var uid = "uid"; //Required +var apiResponse = new ReAuthenticationApi().VerifyMultiFactorPasswordReauthentication(eventBasedMultiFactorToken, uid); +``` + + +
Verify Multifactor PIN Authentication (POST)
+This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by PIN. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/pin/re-auth-validate-pin/) + + + +``` + +EventBasedMultiFactorToken eventBasedMultiFactorToken = new EventBasedMultiFactorToken{ +SecondFactorValidationToken ="" +}; //Required +var uid = "uid"; //Required +var apiResponse = new ReAuthenticationApi().VerifyMultiFactorPINReauthentication(eventBasedMultiFactorToken, uid); +``` + + +
Multi Factor Re-Authenticate (GET)
+This API is used to trigger the Multi-Factor Autentication workflow for the provided access_token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-trigger/) + + + +``` + +var accessToken = "accessToken"; //Required +var smsTemplate2FA = "smsTemplate2FA"; //Optional +var apiResponse = new ReAuthenticationApi().MFAReAuthenticate(accessToken, smsTemplate2FA); +``` + + + + + + + +### ConsentManagement API + + +List of APIs in this Section:
+[PUT : Update Consent By Access Token](#UpdateConsentProfileByAccessToken-put-)
+[POST : Consent By ConsentToken](#SubmitConsentByConsentToken-post-)
+[POST : Post Consent By Access Token](#SubmitConsentByAccessToken-post-)
+[GET : Get Consent Logs By Uid](#GetConsentLogsByUid-get-)
+[GET : Get Consent Log by Access Token](#GetConsentLogs-get-)
+[GET : Get Verify Consent By Access Token](#VerifyConsentByAccessToken-get-)
+ + + +
Update Consent By Access Token (PUT)
+This API is to update consents using access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/update-consent-by-access-token/) + + + +``` + +var accessToken = "accessToken"; //Required +ConsentUpdateModel consentUpdateModel = new ConsentUpdateModel{ +Consents = new List{ +new ConsentDataModel{ +ConsentOptionId ="", +IsAccepted = true +}} +}; //Required +var apiResponse = new ConsentManagementApi().UpdateConsentProfileByAccessToken(accessToken, consentUpdateModel); +``` + + +
Consent By ConsentToken (POST)
+This API is to submit consent form using consent token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-by-consent-token/) + + + +``` + +var consentToken = "consentToken"; //Required +ConsentSubmitModel consentSubmitModel = new ConsentSubmitModel{ +Data = new List{ +new ConsentDataModel{ +ConsentOptionId ="", +IsAccepted = true +}}, +Events = new List{ +new ConsentEventModel{ +Event ="", +IsCustom = true +}} +}; //Required +var apiResponse = new ConsentManagementApi().SubmitConsentByConsentToken(consentToken, consentSubmitModel); +``` + + +
Post Consent By Access Token (POST)
+API to provide a way to end user to submit a consent form for particular event type. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-by-access-token/) + + + +``` + +var accessToken = "accessToken"; //Required +ConsentSubmitModel consentSubmitModel = new ConsentSubmitModel{ +Data = new List{ +new ConsentDataModel{ +ConsentOptionId ="", +IsAccepted = true +}}, +Events = new List{ +new ConsentEventModel{ +Event ="", +IsCustom = true +}} +}; //Required +var apiResponse = new ConsentManagementApi().SubmitConsentByAccessToken(accessToken, consentSubmitModel); +``` + + +
Get Consent Logs By Uid (GET)
+This API is used to get the Consent logs of the user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-uid/) + + + +``` + +var uid = "uid"; //Required +var apiResponse = new ConsentManagementApi().GetConsentLogsByUid(uid); +``` + + +
Get Consent Log by Access Token (GET)
+This API is used to fetch consent logs. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-access-token/) + + + +``` + +var accessToken = "accessToken"; //Required +var apiResponse = new ConsentManagementApi().GetConsentLogs(accessToken); +``` + + +
Get Verify Consent By Access Token (GET)
+This API is used to check if consent is submitted for a particular event or not. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/verify-consent-by-access-token/) + + + +``` + +var accessToken = "accessToken"; //Required +var @event = "@event"; //Required +var isCustom = true; //Required +var apiResponse = new ConsentManagementApi().VerifyConsentByAccessToken(accessToken, @event, isCustom); +``` + + + + + + + ### SmartLogin API @@ -3057,7 +3619,7 @@ List of APIs in this Section:
[GET : Access Token via Facebook Token](#GetAccessTokenByFacebookAccessToken-get-)
[GET : Access Token via Twitter Token](#GetAccessTokenByTwitterAccessToken-get-)
[GET : Access Token via Google Token](#GetAccessTokenByGoogleAccessToken-get-)
-[GET : LoginRadius Access Token using google JWT token for Native Mobile Login](#GetAccessTokenByGoogleJWTAccessToken-get-)
+[GET : Access Token using google JWT token for Native Mobile Login](#GetAccessTokenByGoogleJWTAccessToken-get-)
[GET : Access Token via Linkedin Token](#GetAccessTokenByLinkedinAccessToken-get-)
[GET : Get Access Token By Foursquare Access Token](#GetAccessTokenByFoursquareAccessToken-get-)
[GET : Access Token via Vkontakte Token](#GetAccessTokenByVkontakteAccessToken-get-)
@@ -3066,7 +3628,7 @@ List of APIs in this Section:
Access Token via Facebook Token (GET)
-The API is used to get LoginRadius access token by sending Facebook’s access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-facebook-token/) +The API is used to get LoginRadius access token by sending Facebook's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-facebook-token/) @@ -3078,7 +3640,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByFacebookAccessToken(fbAc
Access Token via Twitter Token (GET)
-The API is used to get LoginRadius access token by sending Twitter’s access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-twitter-token) +The API is used to get LoginRadius access token by sending Twitter's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-twitter-token) @@ -3091,7 +3653,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByTwitterAccessToken(twAcc
Access Token via Google Token (GET)
-The API is used to get LoginRadius access token by sending Google’s access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-token) +The API is used to get LoginRadius access token by sending Google's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-token) @@ -3104,7 +3666,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByGoogleAccessToken(google ``` -
LoginRadius Access Token using google JWT token for Native Mobile Login (GET)
+
Access Token using google JWT token for Native Mobile Login (GET)
This API is used to Get LoginRadius Access Token using google jwt id token for google native mobile login/registration. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-googlejwt) @@ -3117,7 +3679,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByGoogleJWTAccessToken(idT
Access Token via Linkedin Token (GET)
-The API is used to get LoginRadius access token by sending Linkedin’s access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-linkedin-token/) +The API is used to get LoginRadius access token by sending Linkedin's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-linkedin-token/) @@ -3129,7 +3691,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByLinkedinAccessToken(lnAc
Get Access Token By Foursquare Access Token (GET)
-The API is used to get LoginRadius access token by sending Foursquare’s access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-foursquare-token/) +The API is used to get LoginRadius access token by sending Foursquare's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-foursquare-token/) @@ -3141,7 +3703,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByFoursquareAccessToken(fs
Access Token via Vkontakte Token (GET)
-The API is used to get LoginRadius access token by sending Vkontakte’s access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-vkontakte-token) +The API is used to get LoginRadius access token by sending Vkontakte's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-vkontakte-token) @@ -3153,7 +3715,7 @@ var apiResponse = new NativeSocialApi().GetAccessTokenByVkontakteAccessToken(vkA
Access Token via Google AuthCode (GET)
-The API is used to get LoginRadius access token by sending Google’s AuthCode. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-auth-code) +The API is used to get LoginRadius access token by sending Google's AuthCode. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-auth-code) diff --git a/Source/LoginRadiusSDK.V2/Api/Account/AccountApi.cs b/Source/LoginRadiusSDK.V2/Api/Account/AccountApi.cs index 8fa3d8c..722946a 100644 --- a/Source/LoginRadiusSDK.V2/Api/Account/AccountApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Account/AccountApi.cs @@ -18,12 +18,12 @@ namespace LoginRadiusSDK.V2.Api.Account public class AccountApi : LoginRadiusResource { /// - /// This API is used to update the information of existing accounts in your Cloud Storage. See our Advanced API Usage section Here for more capabilities. + /// This API is used to update the information of existing accounts in your Cloud Storage. See our Advanced API Usage section Here for more capabilities. /// /// Model Class containing Definition of payload for Account Update API /// UID, the unified identifier for each user account /// The fields parameter filters the API response so that the response only includes a specific set of fields - /// Boolean, pass true if you wish to update any user profile field with a NULL value, You can get the details Here + /// Boolean, pass true if you wish to update any user profile field with a NULL value, You can get the details Here /// Response containing Definition for Complete profile data /// 18.15 @@ -224,7 +224,7 @@ public ApiResponse GetAccountProfileByUid(string uid, string fields = return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// This API is used to update the information of existing accounts in your Cloud Storage. See our Advanced API Usage section Here for more capabilities. + /// This API is used to update the information of existing accounts in your Cloud Storage. See our Advanced API Usage section Here for more capabilities. /// /// Model Class containing Definition of payload for Account Update API /// UID, the unified identifier for each user account @@ -420,7 +420,7 @@ public ApiResponse InvalidateAccountEmailVerification(string uid, /// 18.22 public ApiResponse GetForgotPasswordToken(string email, string emailTemplate = null, - string resetPasswordUrl = null, bool sendEmail = false) + string resetPasswordUrl = null, bool? sendEmail = null) { if (string.IsNullOrWhiteSpace(email)) { @@ -683,5 +683,58 @@ public ApiResponse> GetAccountIdentitiesByEmail(string emai return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } + /// + /// This API is used to delete all user profiles associated with an Email. + /// + /// Email of the user + /// Response containing Definition of Delete Request + /// 18.36 + + public ApiResponse AccountDeleteByEmail(string email) + { + if (string.IsNullOrWhiteSpace(email)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(email)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] }, + { "email", email } + }; + + var resourcePath = "identity/v2/manage/account"; + + return ConfigureAndExecute(HttpMethod.DELETE, resourcePath, queryParameters, null); + } + /// + /// 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. + /// + /// Payload containing Update UID + /// UID, the unified identifier for each user account + /// Response containing Definition of Complete Validation data + /// 18.41 + + public ApiResponse AccountUpdateUid(UpdateUidModel updateUidModel, string uid) + { + if (updateUidModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(updateUidModel)); + } + if (string.IsNullOrWhiteSpace(uid)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(uid)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] }, + { "uid", uid } + }; + + var resourcePath = "identity/v2/manage/account/uid"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(updateUidModel)); + } } } \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Api/Advanced/ConsentManagementApi.cs b/Source/LoginRadiusSDK.V2/Api/Advanced/ConsentManagementApi.cs new file mode 100644 index 0000000..6c9fa40 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Api/Advanced/ConsentManagementApi.cs @@ -0,0 +1,182 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using LoginRadiusSDK.V2.Common; +using LoginRadiusSDK.V2.Util; +using LoginRadiusSDK.V2.Models.ResponseModels; +using LoginRadiusSDK.V2.Models.ResponseModels.UserProfile; +using LoginRadiusSDK.V2.Models.RequestModels; + +namespace LoginRadiusSDK.V2.Api.Advanced +{ + public class ConsentManagementApi : LoginRadiusResource + { + /// + /// This API is used to get the Consent logs of the user. + /// + /// UID, the unified identifier for each user account + /// Response containing consent logs + /// 18.37 + + public ApiResponse GetConsentLogsByUid(string uid) + { + if (string.IsNullOrWhiteSpace(uid)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(uid)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] } + }; + + var resourcePath = $"identity/v2/manage/account/{uid}/consent/logs"; + + return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// This API is to submit consent form using consent token. + /// + /// The consent token received after login error 1226 + /// Model class containing list of multiple consent + /// Response containing User Profile Data and access token + /// 43.1 + + public ApiResponse> SubmitConsentByConsentToken(string consentToken, ConsentSubmitModel consentSubmitModel) + { + if (string.IsNullOrWhiteSpace(consentToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(consentToken)); + } + if (consentSubmitModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(consentSubmitModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "consentToken", consentToken } + }; + + var resourcePath = "identity/v2/auth/consent"; + + return ConfigureAndExecute>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(consentSubmitModel)); + } + /// + /// This API is used to fetch consent logs. + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Response containing consent logs + /// 43.2 + + public ApiResponse GetConsentLogs(string accessToken) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/consent/logs"; + + return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// API to provide a way to end user to submit a consent form for particular event type. + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model class containing list of multiple consent + /// Response containing Definition for Complete profile data + /// 43.3 + + public ApiResponse SubmitConsentByAccessToken(string accessToken, ConsentSubmitModel consentSubmitModel) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (consentSubmitModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(consentSubmitModel)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/consent/profile"; + + return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(consentSubmitModel)); + } + /// + /// This API is used to check if consent is submitted for a particular event or not. + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject + /// true/false + /// Response containing consent profile + /// 43.4 + + public ApiResponse VerifyConsentByAccessToken(string accessToken, string @event, + bool? isCustom) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(@event)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(@event)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "event", @event }, + { "isCustom", isCustom.ToString() } + }; + + var resourcePath = "identity/v2/auth/consent/verify"; + + return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// This API is to update consents using access token. + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model class containg list of multiple consent + /// Response containing consent profile + /// 43.5 + + public ApiResponse UpdateConsentProfileByAccessToken(string accessToken, ConsentUpdateModel consentUpdateModel) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (consentUpdateModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(consentUpdateModel)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/consent"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(consentUpdateModel)); + } + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Api/Advanced/MultiFactorAuthenticationApi.cs b/Source/LoginRadiusSDK.V2/Api/Advanced/MultiFactorAuthenticationApi.cs index 197aeca..421d71f 100644 --- a/Source/LoginRadiusSDK.V2/Api/Advanced/MultiFactorAuthenticationApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Advanced/MultiFactorAuthenticationApi.cs @@ -641,152 +641,6 @@ public ApiResponse MFAResendOTP(string secondFactorAuthenticati return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// This API is used to trigger the Multi-Factor Autentication workflow for the provided access_token - /// - /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. - /// SMS Template Name - /// Response containing Definition of Complete Multi-Factor Authentication Settings data - /// 14.3 - - public ApiResponse MFAReAuthenticate(string accessToken, string smsTemplate2FA = null) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); - } - var queryParameters = new QueryParameters - { - { "access_token", accessToken }, - { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } - }; - if (!string.IsNullOrWhiteSpace(smsTemplate2FA)) - { - queryParameters.Add("smsTemplate2FA", smsTemplate2FA); - } - - var resourcePath = "identity/v2/auth/account/reauth/2fa"; - - return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); - } - /// - /// This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS - /// - /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. - /// Model Class containing Definition for MFA Reauthentication by OTP - /// Complete user Multi-Factor Authentication Token data - /// 14.4 - - public ApiResponse MFAReAuthenticateByOTP(string accessToken, ReauthByOtpModel reauthByOtpModel) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); - } - if (reauthByOtpModel == null) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(reauthByOtpModel)); - } - var queryParameters = new QueryParameters - { - { "access_token", accessToken }, - { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } - }; - - var resourcePath = "identity/v2/auth/account/reauth/2fa/otp"; - - return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(reauthByOtpModel)); - } - /// - /// This API is used to re-authenticate by set of backup codes via access_token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device - /// - /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. - /// Model Class containing Definition for MFA Reauthentication by Backup code - /// Complete user Multi-Factor Authentication Token data - /// 14.5 - - public ApiResponse MFAReAuthenticateByBackupCode(string accessToken, ReauthByBackupCodeModel reauthByBackupCodeModel) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); - } - if (reauthByBackupCodeModel == null) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(reauthByBackupCodeModel)); - } - var queryParameters = new QueryParameters - { - { "access_token", accessToken }, - { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } - }; - - var resourcePath = "identity/v2/auth/account/reauth/2fa/backupcode"; - - return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(reauthByBackupCodeModel)); - } - /// - /// This API is used to re-authenticate via Multi-factor-authentication by passing the google authenticator code - /// - /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. - /// Model Class containing Definition for MFA Reauthentication by Google Authenticator - /// Complete user Multi-Factor Authentication Token data - /// 14.6 - - public ApiResponse MFAReAuthenticateByGoogleAuth(string accessToken, ReauthByGoogleAuthenticatorCodeModel reauthByGoogleAuthenticatorCodeModel) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); - } - if (reauthByGoogleAuthenticatorCodeModel == null) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(reauthByGoogleAuthenticatorCodeModel)); - } - var queryParameters = new QueryParameters - { - { "access_token", accessToken }, - { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } - }; - - var resourcePath = "identity/v2/auth/account/reauth/2fa/googleauthenticatorcode"; - - return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(reauthByGoogleAuthenticatorCodeModel)); - } - /// - /// This API is used to re-authenticate via Multi-factor-authentication by passing the password - /// - /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. - /// Model Class containing Definition of payload for PasswordEventBasedAuthModel with Lockout API - /// SMS Template Name - /// Complete user Multi-Factor Authentication Token data - /// 14.7 - - public ApiResponse MFAReAuthenticateByPassword(string accessToken, PasswordEventBasedAuthModelWithLockout passwordEventBasedAuthModelWithLockout, - string smsTemplate2FA = null) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); - } - if (passwordEventBasedAuthModelWithLockout == null) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(passwordEventBasedAuthModelWithLockout)); - } - var queryParameters = new QueryParameters - { - { "access_token", accessToken }, - { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } - }; - if (!string.IsNullOrWhiteSpace(smsTemplate2FA)) - { - queryParameters.Add("smsTemplate2FA", smsTemplate2FA); - } - - var resourcePath = "identity/v2/auth/account/reauth/password"; - - return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(passwordEventBasedAuthModelWithLockout)); - } - /// /// This API resets the SMS Authenticator configurations on a given account via the UID. /// /// Pass 'otpauthenticator' to remove SMS Authenticator diff --git a/Source/LoginRadiusSDK.V2/Api/Advanced/ReAuthenticationApi.cs b/Source/LoginRadiusSDK.V2/Api/Advanced/ReAuthenticationApi.cs new file mode 100644 index 0000000..0657cf0 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Api/Advanced/ReAuthenticationApi.cs @@ -0,0 +1,284 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using LoginRadiusSDK.V2.Common; +using LoginRadiusSDK.V2.Util; +using LoginRadiusSDK.V2.Models.ResponseModels; +using LoginRadiusSDK.V2.Models.RequestModels; +using LoginRadiusSDK.V2.Models.ResponseModels.OtherObjects; + +namespace LoginRadiusSDK.V2.Api.Advanced +{ + public class ReAuthenticationApi : LoginRadiusResource + { + /// + /// This API is used to trigger the Multi-Factor Autentication workflow for the provided access_token + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// SMS Template Name + /// Response containing Definition of Complete Multi-Factor Authentication Settings data + /// 14.3 + + public ApiResponse MFAReAuthenticate(string accessToken, string smsTemplate2FA = null) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + if (!string.IsNullOrWhiteSpace(smsTemplate2FA)) + { + queryParameters.Add("smsTemplate2FA", smsTemplate2FA); + } + + var resourcePath = "identity/v2/auth/account/reauth/2fa"; + + return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model Class containing Definition for MFA Reauthentication by OTP + /// Complete user Multi-Factor Authentication Token data + /// 14.4 + + public ApiResponse MFAReAuthenticateByOTP(string accessToken, ReauthByOtpModel reauthByOtpModel) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (reauthByOtpModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(reauthByOtpModel)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/account/reauth/2fa/otp"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(reauthByOtpModel)); + } + /// + /// This API is used to re-authenticate by set of backup codes via access_token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model Class containing Definition for MFA Reauthentication by Backup code + /// Complete user Multi-Factor Authentication Token data + /// 14.5 + + public ApiResponse MFAReAuthenticateByBackupCode(string accessToken, ReauthByBackupCodeModel reauthByBackupCodeModel) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (reauthByBackupCodeModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(reauthByBackupCodeModel)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/account/reauth/2fa/backupcode"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(reauthByBackupCodeModel)); + } + /// + /// This API is used to re-authenticate via Multi-factor-authentication by passing the google authenticator code + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model Class containing Definition for MFA Reauthentication by Google Authenticator + /// Complete user Multi-Factor Authentication Token data + /// 14.6 + + public ApiResponse MFAReAuthenticateByGoogleAuth(string accessToken, ReauthByGoogleAuthenticatorCodeModel reauthByGoogleAuthenticatorCodeModel) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (reauthByGoogleAuthenticatorCodeModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(reauthByGoogleAuthenticatorCodeModel)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/account/reauth/2fa/googleauthenticatorcode"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(reauthByGoogleAuthenticatorCodeModel)); + } + /// + /// This API is used to re-authenticate via Multi-factor-authentication by passing the password + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model Class containing Definition of payload for PasswordEventBasedAuthModel with Lockout API + /// SMS Template Name + /// Complete user Multi-Factor Authentication Token data + /// 14.7 + + public ApiResponse MFAReAuthenticateByPassword(string accessToken, PasswordEventBasedAuthModelWithLockout passwordEventBasedAuthModelWithLockout, + string smsTemplate2FA = null) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (passwordEventBasedAuthModelWithLockout == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(passwordEventBasedAuthModelWithLockout)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + if (!string.IsNullOrWhiteSpace(smsTemplate2FA)) + { + queryParameters.Add("smsTemplate2FA", smsTemplate2FA); + } + + var resourcePath = "identity/v2/auth/account/reauth/password"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(passwordEventBasedAuthModelWithLockout)); + } + /// + /// This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by OTP. + /// + /// Model Class containing Definition for SecondFactorValidationToken + /// UID, the unified identifier for each user account + /// Response containing Definition of Complete Validation data + /// 18.38 + + public ApiResponse VerifyMultiFactorOtpReauthentication(EventBasedMultiFactorToken eventBasedMultiFactorToken, string uid) + { + if (eventBasedMultiFactorToken == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(eventBasedMultiFactorToken)); + } + if (string.IsNullOrWhiteSpace(uid)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(uid)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] } + }; + + var resourcePath = $"identity/v2/manage/account/{uid}/reauth/2fa"; + + return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(eventBasedMultiFactorToken)); + } + /// + /// This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by password. + /// + /// Model Class containing Definition for SecondFactorValidationToken + /// UID, the unified identifier for each user account + /// Response containing Definition of Complete Validation data + /// 18.39 + + public ApiResponse VerifyMultiFactorPasswordReauthentication(EventBasedMultiFactorToken eventBasedMultiFactorToken, string uid) + { + if (eventBasedMultiFactorToken == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(eventBasedMultiFactorToken)); + } + if (string.IsNullOrWhiteSpace(uid)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(uid)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] } + }; + + var resourcePath = $"identity/v2/manage/account/{uid}/reauth/password"; + + return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(eventBasedMultiFactorToken)); + } + /// + /// This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by PIN. + /// + /// Model Class containing Definition for SecondFactorValidationToken + /// UID, the unified identifier for each user account + /// Response containing Definition of Complete Validation data + /// 18.40 + + public ApiResponse VerifyMultiFactorPINReauthentication(EventBasedMultiFactorToken eventBasedMultiFactorToken, string uid) + { + if (eventBasedMultiFactorToken == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(eventBasedMultiFactorToken)); + } + if (string.IsNullOrWhiteSpace(uid)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(uid)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] } + }; + + var resourcePath = $"identity/v2/manage/account/{uid}/reauth/pin"; + + return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(eventBasedMultiFactorToken)); + } + /// + /// This API is used to validate the triggered MFA authentication flow with a password. + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model Class containing Definition of payload for PIN + /// SMS Template Name + /// Response containing Definition response of MFA reauthentication + /// 42.13 + + public ApiResponse VerifyPINAuthentication(string accessToken, PINAuthEventBasedAuthModelWithLockout pINAuthEventBasedAuthModelWithLockout, + string smsTemplate2FA = null) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (pINAuthEventBasedAuthModelWithLockout == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(pINAuthEventBasedAuthModelWithLockout)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + if (!string.IsNullOrWhiteSpace(smsTemplate2FA)) + { + queryParameters.Add("smsTemplate2FA", smsTemplate2FA); + } + + var resourcePath = "identity/v2/auth/account/reauth/pin"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(pINAuthEventBasedAuthModelWithLockout)); + } + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Api/Authentication/AuthenticationApi.cs b/Source/LoginRadiusSDK.V2/Api/Authentication/AuthenticationApi.cs index 0a7f00b..52cdc10 100644 --- a/Source/LoginRadiusSDK.V2/Api/Authentication/AuthenticationApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Authentication/AuthenticationApi.cs @@ -25,7 +25,7 @@ public class AuthenticationApi : LoginRadiusResource /// Model Class containing Definition of payload for User Profile update API /// Email template name /// The fields parameter filters the API response so that the response only includes a specific set of fields - /// >Boolean, pass true if you wish to update any user profile field with a NULL value, You can get the details Here + /// >Boolean, pass true if you wish to update any user profile field with a NULL value, You can get the details Here /// SMS Template name /// Email verification url /// Response containing Definition of Complete Validation and UserProfile data @@ -1172,60 +1172,6 @@ public ApiResponse>> UserRegistrat return ConfigureAndExecute>>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(authUserRegistrationModel)); } /// - /// This API registers the new users into your Cloud Storage and triggers the phone verification process. - /// - /// Model Class containing Definition of payload for Auth User Registration API - /// LoginRadius Secured One Time Token - /// The fields parameter filters the API response so that the response only includes a specific set of fields - /// PreventVerificationEmail (Specifying this value prevents the verification email from being sent. Only applicable if you have the optional email verification flow) - /// SMS Template name - /// Email verification url - /// Name of the welcome email template - /// Response containing Definition of Complete Validation, UserProfile data and Access Token - /// 17.1.2 - - public ApiResponse>> UserRegistrationByPhone(AuthUserRegistrationModel authUserRegistrationModel, string sott, - string fields = "", string options = "", string smsTemplate = null, string verificationUrl = null, string welcomeEmailTemplate = null) - { - if (authUserRegistrationModel == null) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(authUserRegistrationModel)); - } - if (string.IsNullOrWhiteSpace(sott)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(sott)); - } - var queryParameters = new QueryParameters - { - { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, - { "sott", sott } - }; - if (!string.IsNullOrWhiteSpace(fields)) - { - queryParameters.Add("fields", fields); - } - if (!string.IsNullOrWhiteSpace(options)) - { - queryParameters.Add("options", options); - } - if (!string.IsNullOrWhiteSpace(smsTemplate)) - { - queryParameters.Add("smsTemplate", smsTemplate); - } - if (!string.IsNullOrWhiteSpace(verificationUrl)) - { - queryParameters.Add("verificationUrl", verificationUrl); - } - if (!string.IsNullOrWhiteSpace(welcomeEmailTemplate)) - { - queryParameters.Add("welcomeEmailTemplate", welcomeEmailTemplate); - } - - var resourcePath = "identity/v2/auth/register"; - - return ConfigureAndExecute>>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(authUserRegistrationModel)); - } - /// /// This API creates a user in the database as well as sends a verification email to the user. /// /// Model Class containing Definition of payload for Auth User Registration by Recaptcha API diff --git a/Source/LoginRadiusSDK.V2/Api/Authentication/PINAuthenticationApi.cs b/Source/LoginRadiusSDK.V2/Api/Authentication/PINAuthenticationApi.cs new file mode 100644 index 0000000..0ecd69e --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Api/Authentication/PINAuthenticationApi.cs @@ -0,0 +1,375 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using LoginRadiusSDK.V2.Common; +using LoginRadiusSDK.V2.Util; +using LoginRadiusSDK.V2.Models.ResponseModels; +using LoginRadiusSDK.V2.Models.ResponseModels.UserProfile; +using LoginRadiusSDK.V2.Models.RequestModels; +using LoginRadiusSDK.V2.Models.ResponseModels.OtherObjects; + +namespace LoginRadiusSDK.V2.Api.Authentication +{ + public class PINAuthenticationApi : LoginRadiusResource + { + /// + /// This API is used to login a user by pin and session_token. + /// + /// Model Class containing Definition of payload for LoginByPin API + /// Session Token of user + /// Response containing User Profile Data and access token + /// 9.22 + + public ApiResponse> PINLogin(LoginByPINModel loginByPINModel, string sessionToken) + { + if (loginByPINModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(loginByPINModel)); + } + if (string.IsNullOrWhiteSpace(sessionToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(sessionToken)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "session_token", sessionToken } + }; + + var resourcePath = "identity/v2/auth/login/pin"; + + return ConfigureAndExecute>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(loginByPINModel)); + } + /// + /// This API sends the reset pin email to specified email address. + /// + /// Model Class containing Definition for Forgot Pin Link By Email API + /// Email template name + /// Reset PIN Url + /// Response containing Definition of Complete Validation data + /// 42.1 + + public ApiResponse SendForgotPINEmailByEmail(ForgotPINLinkByEmailModel forgotPINLinkByEmailModel, string emailTemplate = null, + string resetPINUrl = null) + { + if (forgotPINLinkByEmailModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(forgotPINLinkByEmailModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + if (!string.IsNullOrWhiteSpace(emailTemplate)) + { + queryParameters.Add("emailTemplate", emailTemplate); + } + if (!string.IsNullOrWhiteSpace(resetPINUrl)) + { + queryParameters.Add("resetPINUrl", resetPINUrl); + } + + var resourcePath = "identity/v2/auth/pin/forgot/email"; + + return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(forgotPINLinkByEmailModel)); + } + /// + /// This API sends the reset pin email using username. + /// + /// Model Class containing Definition for Forgot Pin Link By UserName API + /// Email template name + /// Reset PIN Url + /// Response containing Definition of Complete Validation data + /// 42.2 + + public ApiResponse SendForgotPINEmailByUsername(ForgotPINLinkByUserNameModel forgotPINLinkByUserNameModel, string emailTemplate = null, + string resetPINUrl = null) + { + if (forgotPINLinkByUserNameModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(forgotPINLinkByUserNameModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + if (!string.IsNullOrWhiteSpace(emailTemplate)) + { + queryParameters.Add("emailTemplate", emailTemplate); + } + if (!string.IsNullOrWhiteSpace(resetPINUrl)) + { + queryParameters.Add("resetPINUrl", resetPINUrl); + } + + var resourcePath = "identity/v2/auth/pin/forgot/username"; + + return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(forgotPINLinkByUserNameModel)); + } + /// + /// This API is used to reset pin using reset token. + /// + /// Model Class containing Definition of payload for Reset Pin By Reset Token API + /// Response containing Definition of Complete Validation data + /// 42.3 + + public ApiResponse ResetPINByResetToken(ResetPINByResetToken resetPINByResetToken) + { + if (resetPINByResetToken == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINByResetToken)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/token"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINByResetToken)); + } + /// + /// This API is used to reset pin using security question answer and email. + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question and Email API + /// Response containing Definition of Complete Validation data + /// 42.4 + + public ApiResponse ResetPINByEmailAndSecurityAnswer(ResetPINBySecurityQuestionAnswerAndEmailModel resetPINBySecurityQuestionAnswerAndEmailModel) + { + if (resetPINBySecurityQuestionAnswerAndEmailModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINBySecurityQuestionAnswerAndEmailModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/securityanswer/email"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINBySecurityQuestionAnswerAndEmailModel)); + } + /// + /// This API is used to reset pin using security question answer and username. + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question and UserName API + /// Response containing Definition of Complete Validation data + /// 42.5 + + public ApiResponse ResetPINByUsernameAndSecurityAnswer(ResetPINBySecurityQuestionAnswerAndUsernameModel resetPINBySecurityQuestionAnswerAndUsernameModel) + { + if (resetPINBySecurityQuestionAnswerAndUsernameModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINBySecurityQuestionAnswerAndUsernameModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/securityanswer/username"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINBySecurityQuestionAnswerAndUsernameModel)); + } + /// + /// This API is used to reset pin using security question answer and phone. + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question and Phone API + /// Response containing Definition of Complete Validation data + /// 42.6 + + public ApiResponse ResetPINByPhoneAndSecurityAnswer(ResetPINBySecurityQuestionAnswerAndPhoneModel resetPINBySecurityQuestionAnswerAndPhoneModel) + { + if (resetPINBySecurityQuestionAnswerAndPhoneModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINBySecurityQuestionAnswerAndPhoneModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/securityanswer/phone"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINBySecurityQuestionAnswerAndPhoneModel)); + } + /// + /// This API sends the OTP to specified phone number + /// + /// Model Class containing Definition for Forgot Pin Otp By Phone API + /// + /// Response Containing Validation Data and SMS Data + /// 42.7 + + public ApiResponse> SendForgotPINSMSByPhone(ForgotPINOtpByPhoneModel forgotPINOtpByPhoneModel, string smsTemplate = null) + { + if (forgotPINOtpByPhoneModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(forgotPINOtpByPhoneModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + if (!string.IsNullOrWhiteSpace(smsTemplate)) + { + queryParameters.Add("smsTemplate", smsTemplate); + } + + var resourcePath = "identity/v2/auth/pin/forgot/otp"; + + return ConfigureAndExecute>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(forgotPINOtpByPhoneModel)); + } + /// + /// This API is used to change a user's PIN using access token. + /// + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Model Class containing Definition for change PIN Property + /// Response containing Definition of Complete Validation data + /// 42.8 + + public ApiResponse ChangePINByAccessToken(string accessToken, ChangePINModel changePINModel) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (changePINModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(changePINModel)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/change"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(changePINModel)); + } + /// + /// This API is used to reset pin using phoneId and OTP. + /// + /// Model Class containing Definition of payload for Reset Pin By Phone and Otp API + /// Response containing Definition of Complete Validation data + /// 42.9 + + public ApiResponse ResetPINByPhoneAndOtp(ResetPINByPhoneAndOTPModel resetPINByPhoneAndOTPModel) + { + if (resetPINByPhoneAndOTPModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINByPhoneAndOTPModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/otp/phone"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINByPhoneAndOTPModel)); + } + /// + /// This API is used to reset pin using email and OTP. + /// + /// Model Class containing Definition of payload for Reset Pin By Email and Otp API + /// Response containing Definition of Complete Validation data + /// 42.10 + + public ApiResponse ResetPINByEmailAndOtp(ResetPINByEmailAndOtpModel resetPINByEmailAndOtpModel) + { + if (resetPINByEmailAndOtpModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINByEmailAndOtpModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/otp/email"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINByEmailAndOtpModel)); + } + /// + /// This API is used to reset pin using username and OTP. + /// + /// Model Class containing Definition of payload for Reset Pin By Username and Otp API + /// Response containing Definition of Complete Validation data + /// 42.11 + + public ApiResponse ResetPINByUsernameAndOtp(ResetPINByUsernameAndOtpModel resetPINByUsernameAndOtpModel) + { + if (resetPINByUsernameAndOtpModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(resetPINByUsernameAndOtpModel)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } + }; + + var resourcePath = "identity/v2/auth/pin/reset/otp/username"; + + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(resetPINByUsernameAndOtpModel)); + } + /// + /// This API is used to change a user's PIN using Pin Auth token. + /// + /// Model Class containing Definition for PIN + /// Pin Auth Token + /// Response containing User Profile Data and access token + /// 42.12 + + public ApiResponse> SetPINByPinAuthToken(PINRequiredModel pINRequiredModel, string pinAuthToken) + { + if (pINRequiredModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(pINRequiredModel)); + } + if (string.IsNullOrWhiteSpace(pinAuthToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(pinAuthToken)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "pinAuthToken", pinAuthToken } + }; + + var resourcePath = "identity/v2/auth/pin/set/pinauthtoken"; + + return ConfigureAndExecute>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(pINRequiredModel)); + } + /// + /// This API is used to invalidate pin session token. + /// + /// Session Token of user + /// Response containing Definition of Complete Validation data + /// 44.1 + + public ApiResponse InValidatePinSessionToken(string sessionToken) + { + if (string.IsNullOrWhiteSpace(sessionToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(sessionToken)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "session_token", sessionToken } + }; + + var resourcePath = "identity/v2/auth/session_token/invalidate"; + + return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); + } + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Api/Authentication/PhoneAuthenticationApi.cs b/Source/LoginRadiusSDK.V2/Api/Authentication/PhoneAuthenticationApi.cs index 92623de..afdde02 100644 --- a/Source/LoginRadiusSDK.V2/Api/Authentication/PhoneAuthenticationApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Authentication/PhoneAuthenticationApi.cs @@ -156,7 +156,7 @@ public ApiResponse> PhoneVerificationByOTP(string otp, str /// /// This API is used to consume the verification code sent to verify a user's phone number. Use this call for front-end purposes in cases where the user is already logged in by passing the user's access token. /// - /// Access_Token + /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// The Verification Code /// SMS Template name /// Response containing Definition of Complete Validation data @@ -175,6 +175,7 @@ public ApiResponse PhoneVerificationOTPByAccessToken(string access } var queryParameters = new QueryParameters { + { "access_token", accessToken }, { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, { "otp", otp } }; @@ -183,14 +184,9 @@ public ApiResponse PhoneVerificationOTPByAccessToken(string access queryParameters.Add("smsTemplate", smsTemplate); } - var bodyParameters = new BodyParameters - { - { "access_token", accessToken } - }; - var resourcePath = "identity/v2/auth/phone/otp"; - return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(bodyParameters)); + return ConfigureAndExecute(HttpMethod.PUT, resourcePath, queryParameters, null); } /// /// This API is used to resend a verification OTP to verify a user's Phone Number. The user will receive a verification code that they will need to input @@ -246,6 +242,7 @@ public ApiResponse> PhoneResendVerifica } var queryParameters = new QueryParameters { + { "access_token", accessToken }, { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] } }; if (!string.IsNullOrWhiteSpace(smsTemplate)) @@ -255,7 +252,6 @@ public ApiResponse> PhoneResendVerifica var bodyParameters = new BodyParameters { - { "access_token", accessToken }, { "phone", phone } }; @@ -305,7 +301,7 @@ public ApiResponse> UpdatePhoneNumber(s /// /// This API is used to check the Phone Number exists or not on your site. /// - /// LoginRadius API Key + /// The Registered Phone Number /// Response containing Definition Complete ExistResponse data /// 11.6 @@ -348,5 +344,59 @@ public ApiResponse RemovePhoneIDByAccessToken(string accessToken return ConfigureAndExecute(HttpMethod.DELETE, resourcePath, queryParameters, null); } + /// + /// This API registers the new users into your Cloud Storage and triggers the phone verification process. + /// + /// Model Class containing Definition of payload for Auth User Registration API + /// LoginRadius Secured One Time Token + /// The fields parameter filters the API response so that the response only includes a specific set of fields + /// PreventVerificationEmail (Specifying this value prevents the verification email from being sent. Only applicable if you have the optional email verification flow) + /// SMS Template name + /// Email verification url + /// Name of the welcome email template + /// Response containing Definition of Complete Validation, UserProfile data and Access Token + /// 17.1.2 + + public ApiResponse>> UserRegistrationByPhone(AuthUserRegistrationModel authUserRegistrationModel, string sott, + string fields = "", string options = "", string smsTemplate = null, string verificationUrl = null, string welcomeEmailTemplate = null) + { + if (authUserRegistrationModel == null) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(authUserRegistrationModel)); + } + if (string.IsNullOrWhiteSpace(sott)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(sott)); + } + var queryParameters = new QueryParameters + { + { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, + { "sott", sott } + }; + if (!string.IsNullOrWhiteSpace(fields)) + { + queryParameters.Add("fields", fields); + } + if (!string.IsNullOrWhiteSpace(options)) + { + queryParameters.Add("options", options); + } + if (!string.IsNullOrWhiteSpace(smsTemplate)) + { + queryParameters.Add("smsTemplate", smsTemplate); + } + if (!string.IsNullOrWhiteSpace(verificationUrl)) + { + queryParameters.Add("verificationUrl", verificationUrl); + } + if (!string.IsNullOrWhiteSpace(welcomeEmailTemplate)) + { + queryParameters.Add("welcomeEmailTemplate", welcomeEmailTemplate); + } + + var resourcePath = "identity/v2/auth/register"; + + return ConfigureAndExecute>>(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(authUserRegistrationModel)); + } } } \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Api/Social/NativeSocialApi.cs b/Source/LoginRadiusSDK.V2/Api/Social/NativeSocialApi.cs index 9d029ee..66f7269 100644 --- a/Source/LoginRadiusSDK.V2/Api/Social/NativeSocialApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Social/NativeSocialApi.cs @@ -15,7 +15,7 @@ namespace LoginRadiusSDK.V2.Api.Social public class NativeSocialApi : LoginRadiusResource { /// - /// The API is used to get LoginRadius access token by sending Facebook’s access token. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Facebook's access token. It will be valid for the specific duration of time specified in the response. /// /// Facebook Access Token /// Response containing Definition of Complete Token data @@ -38,7 +38,7 @@ public ApiResponse GetAccessTokenByFacebookAccessToken(string fbAcc return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The API is used to get LoginRadius access token by sending Twitter’s access token. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Twitter's access token. It will be valid for the specific duration of time specified in the response. /// /// Twitter Access Token /// Twitter Token Secret @@ -67,7 +67,7 @@ public ApiResponse GetAccessTokenByTwitterAccessToken(string twAcce return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The API is used to get LoginRadius access token by sending Google’s access token. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Google's access token. It will be valid for the specific duration of time specified in the response. /// /// Google Access Token /// Google Client ID @@ -124,7 +124,7 @@ public ApiResponse GetAccessTokenByGoogleJWTAccessToken(string idTo return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The API is used to get LoginRadius access token by sending Linkedin’s access token. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Linkedin's access token. It will be valid for the specific duration of time specified in the response. /// /// Linkedin Access Token /// Response containing Definition of Complete Token data @@ -147,7 +147,7 @@ public ApiResponse GetAccessTokenByLinkedinAccessToken(string lnAcc return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The API is used to get LoginRadius access token by sending Foursquare’s access token. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Foursquare's access token. It will be valid for the specific duration of time specified in the response. /// /// Foursquare Access Token /// Response containing Definition of Complete Token data @@ -170,7 +170,7 @@ public ApiResponse GetAccessTokenByFoursquareAccessToken(string fsA return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The API is used to get LoginRadius access token by sending Vkontakte’s access token. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Vkontakte's access token. It will be valid for the specific duration of time specified in the response. /// /// Vkontakte Access Token /// Response containing Definition of Complete Token data @@ -193,7 +193,7 @@ public ApiResponse GetAccessTokenByVkontakteAccessToken(string vkAc return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The API is used to get LoginRadius access token by sending Google’s AuthCode. It will be valid for the specific duration of time specified in the response. + /// The API is used to get LoginRadius access token by sending Google's AuthCode. It will be valid for the specific duration of time specified in the response. /// /// Google AuthCode /// Response containing Definition of Complete Token data diff --git a/Source/LoginRadiusSDK.V2/Api/Social/SocialApi.cs b/Source/LoginRadiusSDK.V2/Api/Social/SocialApi.cs index 5a6ca46..e4e4117 100644 --- a/Source/LoginRadiusSDK.V2/Api/Social/SocialApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Social/SocialApi.cs @@ -122,7 +122,7 @@ public ApiResponse InValidateAccessToken(string accessToken) /// /// Token generated from a successful oauth from social platform /// Response containing Definition for Complete active sessions - /// 20.11 + /// 20.11.1 public ApiResponse GetActiveSession(string token) { @@ -146,7 +146,7 @@ public ApiResponse GetActiveSession(string token) /// /// UID, the unified identifier for each user account /// Response containing Definition for Complete active sessions - /// 20.12 + /// 20.11.2 public ApiResponse GetActiveSessionByAccountID(string accountId) { @@ -170,7 +170,7 @@ public ApiResponse GetActiveSessionByAccountID(string account /// /// Social Provider Id /// Response containing Definition for Complete active sessions - /// 20.13 + /// 20.11.3 public ApiResponse GetActiveSessionByProfileID(string profileId) { @@ -194,7 +194,7 @@ public ApiResponse GetActiveSessionByProfileID(string profile /// /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Album Data - /// 22.1 + /// 22.2.1 public ApiResponse> GetAlbums(string accessToken) { @@ -212,11 +212,39 @@ public ApiResponse> GetAlbums(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Audio API is used to get audio files data from the user’s social account.

Supported Providers: Live, Vkontakte + /// Supported Providers: Facebook, Google, Live, Vkontakte.

This API returns the photo albums associated with the passed in access tokens Social Profile. + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response Model containing Albums with next cursor + /// 22.2.2 + + public ApiResponse> GetAlbumsWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/album"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// The Audio API is used to get audio files data from the user's social account.

Supported Providers: Live, Vkontakte ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Audio Data - /// 24.1 + /// 24.2.1 public ApiResponse> GetAudios(string accessToken) { @@ -234,11 +262,39 @@ public ApiResponse> GetAudios(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Check In API is used to get check Ins data from the user’s social account.

Supported Providers: Facebook, Foursquare, Vkontakte + /// The Audio API is used to get audio files data from the user's social account.

Supported Providers: Live, Vkontakte + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response Model containing Audio with next cursor + /// 24.2.2 + + public ApiResponse> GetAudiosWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/audio"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// The Check In API is used to get check Ins data from the user's social account.

Supported Providers: Facebook, Foursquare, Vkontakte ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of CheckIn Data - /// 25.1 + /// 25.2.1 public ApiResponse> GetCheckIns(string accessToken) { @@ -256,7 +312,35 @@ public ApiResponse> GetCheckIns(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Contact API is used to get contacts/friends/connections data from the user’s social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius’ standard data format. This API requires setting permissions in your LoginRadius Dashboard.

Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.

Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo + /// The Check In API is used to get check Ins data from the user's social account.

Supported Providers: Facebook, Foursquare, Vkontakte + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response Model containing Checkins with next cursor + /// 25.2.2 + + public ApiResponse> GetCheckInsWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/checkin"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// The Contact API is used to get contacts/friends/connections data from the user's social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius' standard data format. This API requires setting permissions in your LoginRadius Dashboard.

Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.

Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Cursor value if not all contacts can be retrieved once. @@ -283,11 +367,11 @@ public ApiResponse> GetContacts(string accessToken, stri return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Event API is used to get the event data from the user’s social account.

Supported Providers: Facebook, Live + /// The Event API is used to get the event data from the user's social account.

Supported Providers: Facebook, Live ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Events Data - /// 28.1 + /// 28.2.1 public ApiResponse> GetEvents(string accessToken) { @@ -305,11 +389,39 @@ public ApiResponse> GetEvents(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// Get the following user list from the user’s social account.

Supported Providers: Twitter + /// The Event API is used to get the event data from the user's social account.

Supported Providers: Facebook, Live + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response Model containing Events with next cursor + /// 28.2.2 + + public ApiResponse> GetEventsWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/event"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// Get the following user list from the user's social account.

Supported Providers: Twitter ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Contacts Data - /// 29.1 + /// 29.2.1 public ApiResponse> GetFollowings(string accessToken) { @@ -327,11 +439,39 @@ public ApiResponse> GetFollowings(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Group API is used to get group data from the user’s social account.

Supported Providers: Facebook, Vkontakte + /// Get the following user list from the user's social account.

Supported Providers: Twitter + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response containing Definition of Contact Data with Cursor + /// 29.2.2 + + public ApiResponse> GetFollowingsWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/following"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// The Group API is used to get group data from the user's social account.

Supported Providers: Facebook, Vkontakte ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Groups Data - /// 30.1 + /// 30.2.1 public ApiResponse> GetGroups(string accessToken) { @@ -349,11 +489,39 @@ public ApiResponse> GetGroups(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Like API is used to get likes data from the user’s social account.

Supported Providers: Facebook + /// The Group API is used to get group data from the user's social account.

Supported Providers: Facebook, Vkontakte + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response Model containing Groups with next cursor + /// 30.2.2 + + public ApiResponse> GetGroupsWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/group"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// The Like API is used to get likes data from the user's social account.

Supported Providers: Facebook ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Likes Data - /// 31.1 + /// 31.2.1 public ApiResponse> GetLikes(string accessToken) { @@ -371,7 +539,35 @@ public ApiResponse> GetLikes(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Mention API is used to get mentions data from the user’s social account.

Supported Providers: Twitter + /// The Like API is used to get likes data from the user's social account.

Supported Providers: Facebook + ///
+ /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. + /// Cursor value if not all contacts can be retrieved once. + /// Response Model containing Likes with next cursor + /// 31.2.2 + + public ApiResponse> GetLikesWithCursor(string accessToken, string nextCursor) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); + } + if (string.IsNullOrWhiteSpace(nextCursor)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(nextCursor)); + } + var queryParameters = new QueryParameters + { + { "access_token", accessToken }, + { "nextCursor", nextCursor } + }; + + var resourcePath = "api/v2/like"; + + return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); + } + /// + /// The Mention API is used to get mentions data from the user's social account.

Supported Providers: Twitter ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Status Data @@ -393,7 +589,7 @@ public ApiResponse> GetMentions(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// Post Message API is used to post messages to the user’s contacts.

Supported Providers: Twitter, LinkedIn

The Message API is used to post messages to the user’s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.

GET & POST Message API work the same way except the API method is different + /// Post Message API is used to post messages to the user's contacts.

Supported Providers: Twitter, LinkedIn

The Message API is used to post messages to the user?s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.

GET & POST Message API work the same way except the API method is different ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Body of your message @@ -434,7 +630,7 @@ public ApiResponse PostMessage(string accessToken, string me return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, null); } /// - /// The Page API is used to get the page data from the user’s social account.

Supported Providers: Facebook, LinkedIn + /// The Page API is used to get the page data from the user's social account.

Supported Providers: Facebook, LinkedIn ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Name of the page you want to retrieve info from @@ -462,7 +658,7 @@ public ApiResponse GetPage(string accessToken, string pageName) return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Photo API is used to get photo data from the user’s social account.

Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte + /// The Photo API is used to get photo data from the user's social account.

Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// The id of the album you want to retrieve info from @@ -490,7 +686,7 @@ public ApiResponse> GetPhotos(string accessToken, string albumId) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Post API is used to get post message data from the user’s social account.

Supported Providers: Facebook + /// The Post API is used to get post message data from the user's social account.

Supported Providers: Facebook ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Response Containing List of Posts Data @@ -512,7 +708,7 @@ public ApiResponse> GetPosts(string accessToken) return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Status API is used to update the status on the user’s wall.

Supported Providers: Facebook, Twitter, LinkedIn + /// The Status API is used to update the status on the user's wall.

Supported Providers: Facebook, Twitter, LinkedIn ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Message displayed below the description(Requires URL, Under 70 Characters). @@ -577,29 +773,7 @@ public ApiResponse> StatusPosting(string ac return ConfigureAndExecute>(HttpMethod.POST, resourcePath, queryParameters, null); } /// - /// The Status API is used to get the status messages from the user’s social account. - /// - /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. - /// Response Containing List of Status Data - /// 37.3 - - public ApiResponse> GetStatus(string accessToken) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accessToken)); - } - var queryParameters = new QueryParameters - { - { "access_token", accessToken } - }; - - var resourcePath = "api/v2/status"; - - return ConfigureAndExecute>(HttpMethod.GET, resourcePath, queryParameters, null); - } - /// - /// The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user’s wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.

POST Input Parameter Format: application/x-www-form-urlencoded + /// The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.

POST Input Parameter Format: application/x-www-form-urlencoded ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Model Class containing Definition of payload for Status API @@ -626,7 +800,7 @@ public ApiResponse TrackableStatusPosting(string accessTok return ConfigureAndExecute(HttpMethod.POST, resourcePath, queryParameters, ConvertToJson(statusModel)); } /// - /// The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user’s wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. + /// The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Message displayed below the description(Requires URL, Under 70 Characters). @@ -708,7 +882,7 @@ public ApiResponse TrackableStatusFetching(string postId) return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The User Profile API is used to get social profile data from the user’s social account after authentication.

Supported Providers: All + /// The User Profile API is used to get social profile data from the user's social account after authentication.

Supported Providers: All ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// The fields parameter filters the API response so that the response only includes a specific set of fields @@ -735,7 +909,7 @@ public ApiResponse GetSocialUserProfile(string accessToken, string return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The User Profile API is used to get the latest updated social profile data from the user’s social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius’ standard data format. This API should be called using the access token retrieved from the refresh access token API. + /// The User Profile API is used to get the latest updated social profile data from the user's social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius' standard data format. This API should be called using the access token retrieved from the refresh access token API. /// /// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// The fields parameter filters the API response so that the response only includes a specific set of fields @@ -762,7 +936,7 @@ public ApiResponse GetRefreshedSocialUserProfile(string accessToken return ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// - /// The Video API is used to get video files data from the user’s social account.

Supported Providers: Facebook, Google, Live, Vkontakte + /// The Video API is used to get video files data from the user's social account.

Supported Providers: Facebook, Google, Live, Vkontakte ///
/// Uniquely generated identifier key by LoginRadius that is activated after successful authentication. /// Cursor value if not all contacts can be retrieved once. diff --git a/Source/LoginRadiusSDK.V2/Common/ApiExceptionResponse.cs b/Source/LoginRadiusSDK.V2/Common/ApiExceptionResponse.cs index 49d29e1..d2986e0 100644 --- a/Source/LoginRadiusSDK.V2/Common/ApiExceptionResponse.cs +++ b/Source/LoginRadiusSDK.V2/Common/ApiExceptionResponse.cs @@ -1,5 +1,4 @@ - -using System.Collections.Generic; +using System.Collections.Generic; namespace LoginRadiusSDK.V2.Common @@ -36,10 +35,8 @@ public class ApiExceptionResponse /// Represents errors that occurred during the server validation of request payload. /// public List Errors { get; set; } + public object Data { get; set; } + } - public class ApiExceptionResponse : ApiExceptionResponse - { - public T Data { get; set; } - } } diff --git a/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj b/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj index 49a2de9..121567b 100755 --- a/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj +++ b/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj @@ -25,10 +25,13 @@ Github LoginRadius Inc. True - 10.0.0-beta + 10.0.0 10.0.0.0 10.0.0.0 /~https://github.com/LoginRadius/dot-net-sdk + true + false + LoginRadiusSDKV2.snk diff --git a/Source/LoginRadiusSDK.V2/LoginRadiusSDKV2.snk b/Source/LoginRadiusSDK.V2/LoginRadiusSDKV2.snk new file mode 100644 index 0000000000000000000000000000000000000000..b2e000834a4bfb9f7fa922b59d784c4701e837a9 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097XTZ@1IPtvG5_kqUEq}c5w#&TeYimD|s zhfP-G+AKNTo(I7;tO+s=;+KSMhS8G&NK7-_$rV-aY)N`zZK&Y(7e5Ick4h7WdsGkHIbcpA&Ado?$6)n|{M zS)=D*@pfNKZ>TmCnQO}qhtU`Np>%HV)ihFO31_N-+Ar$YikSHI_ruOluYRlf0LBnh z=8y-1Sn3>}5b!cychjDBNvEtD2l40$NMaxqtctttpR48j$0k#7*Gw61P1&xBzLkz+ zG`QSm=fF`&9iLp1Eu$=Ads(I-3uxFZ~I#_=BQBCyt-LV`{xyV@%?TaSKQ%9 ih>o!AJL6i!P;FjYi%*KwfxRJii%4#g7QY1QxDHFC1S1## literal 0 HcmV?d00001 diff --git a/Source/LoginRadiusSDK.V2/Manager/ConnectionManager.cs b/Source/LoginRadiusSDK.V2/Manager/ConnectionManager.cs index cb01cf8..5504997 100755 --- a/Source/LoginRadiusSDK.V2/Manager/ConnectionManager.cs +++ b/Source/LoginRadiusSDK.V2/Manager/ConnectionManager.cs @@ -41,7 +41,7 @@ public HttpWebRequest GetConnection(ConcurrentDictionary config, HttpWebRequest httpRequest; try { - httpRequest = (HttpWebRequest) WebRequest.Create(url); + httpRequest = (HttpWebRequest)WebRequest.Create(url); } catch (UriFormatException) { @@ -72,8 +72,11 @@ public HttpWebRequest GetConnection(ConcurrentDictionary config, if (proxyDetails.Length == 2) { requestProxy.Credentials = new NetworkCredential(proxyDetails[0], proxyDetails[1]); - } + }else{ + requestProxy.Credentials = new NetworkCredential(proxyDetails[0],""); + } + } httpRequest.Proxy = requestProxy; } #endif diff --git a/Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileActions.cs b/Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileActions.cs new file mode 100644 index 0000000..1801df9 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileActions.cs @@ -0,0 +1,23 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +namespace LoginRadiusSDK.V2.Models.Enums + +{ + + /// + /// Enum Consent Profile Actions type of operation on parameters like subscribe,unsubscribe,notopted + /// + public enum ConsentProfileActions + { + Subscribe, + + Unsubscribe, + + NotOpted + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileUpdateType.cs b/Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileUpdateType.cs new file mode 100644 index 0000000..b19d0a4 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/Enums/ConsentProfileUpdateType.cs @@ -0,0 +1,23 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +namespace LoginRadiusSDK.V2.Models.Enums + +{ + + /// + /// Enum Consent Profile Update Type to define the type of update + /// + public enum ConsentProfileUpdateType + { + ConsentEditor, + + FormMigration, + + Default + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/AccountUserProfileUpdateModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/AccountUserProfileUpdateModel.cs index 89e83a2..747b23f 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/AccountUserProfileUpdateModel.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/AccountUserProfileUpdateModel.cs @@ -5,7 +5,6 @@ // //----------------------------------------------------------------------- -using System.Collections.Generic; using Newtonsoft.Json; namespace LoginRadiusSDK.V2.Models.RequestModels @@ -28,12 +27,6 @@ public class AccountUserProfileUpdateModel:UserProfileUpdateModel [JsonProperty(PropertyName = "EmailVerified")] public bool? EmailVerified {get;set;} - /// - /// Array of Objects,string represents SourceId,Source - /// - [JsonProperty(PropertyName = "ExternalIds")] - public List ExternalIds {get;set;} - /// /// boolean type value, default is true /// diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/AuthUserRegistrationModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/AuthUserRegistrationModel.cs index 4a0e08d..37a3588 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/AuthUserRegistrationModel.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/AuthUserRegistrationModel.cs @@ -94,6 +94,12 @@ public class AuthUserRegistrationModel [JsonProperty(PropertyName = "Company")] public string Company {get;set;} + /// + /// List of Consents + /// + [JsonProperty(PropertyName = "Consents")] + public ConsentSubmitModel Consents {get;set;} + /// /// Country of the user /// @@ -304,12 +310,6 @@ public class AuthUserRegistrationModel [JsonProperty(PropertyName = "JobBookmarks")] public List JobBookmarks {get;set;} - /// - /// Object, string represents KloutId and double represents Score - /// - [JsonProperty(PropertyName = "KloutScore")] - public KloutProfile KloutScore {get;set;} - /// /// language known by user's /// @@ -406,6 +406,12 @@ public class AuthUserRegistrationModel [JsonProperty(PropertyName = "PhoneNumbers")] public List PhoneNumbers {get;set;} + /// + /// PIN Info + /// + [JsonProperty(PropertyName = "PINInfo")] + public PINModel PINInfo {get;set;} + /// /// Array of Objects,strings Name and boolean IsPrimary /// diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/KloutProfile.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ChangePINModel.cs similarity index 59% rename from Source/LoginRadiusSDK.V2/Models/RequestModels/KloutProfile.cs rename to Source/LoginRadiusSDK.V2/Models/RequestModels/ChangePINModel.cs index fdb9bdb..951d52e 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/KloutProfile.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ChangePINModel.cs @@ -11,21 +11,21 @@ namespace LoginRadiusSDK.V2.Models.RequestModels { /// - /// Model Class containing Definition for KloutProfile Property + /// Model Class containing Definition for change PIN Property /// - public class KloutProfile + public class ChangePINModel { /// - /// Id of klout + /// New PIN of user /// - [JsonProperty(PropertyName = "KloutId")] - public string KloutId {get;set;} + [JsonProperty(PropertyName = "NewPIN")] + public string NewPIN {get;set;} /// - /// Object, string represents KloutId and double represents Score + /// Old PIN of user /// - [JsonProperty(PropertyName = "Score")] - public double? Score {get;set;} + [JsonProperty(PropertyName = "OldPIN")] + public string OldPIN {get;set;} } } \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentDataModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentDataModel.cs new file mode 100644 index 0000000..30d4a3f --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentDataModel.cs @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model class containing defination of consent data + /// + public class ConsentDataModel + { + /// + /// Consent Option Id + /// + [JsonProperty(PropertyName = "ConsentOptionId")] + public string ConsentOptionId {get;set;} + + /// + /// Is Accepted + /// + [JsonProperty(PropertyName = "IsAccepted")] + public bool? IsAccepted {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentEventModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentEventModel.cs new file mode 100644 index 0000000..c080ada --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentEventModel.cs @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model class containing list of consent + /// + public class ConsentEventModel + { + /// + /// Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject + /// + [JsonProperty(PropertyName = "Event")] + public string Event {get;set;} + + /// + /// true/false + /// + [JsonProperty(PropertyName = "IsCustom")] + public bool? IsCustom {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentSubmitModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentSubmitModel.cs new file mode 100644 index 0000000..f1259a4 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentSubmitModel.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model class containing list of multiple consent + /// + public class ConsentSubmitModel + { + /// + /// Data + /// + [JsonProperty(PropertyName = "Data")] + public List Data {get;set;} + + /// + /// The event associated with the consent form + /// + [JsonProperty(PropertyName = "Events")] + public List Events {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentUpdateModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentUpdateModel.cs new file mode 100644 index 0000000..82f6c6d --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ConsentUpdateModel.cs @@ -0,0 +1,26 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model class containg list of multiple consent + /// + public class ConsentUpdateModel + { + /// + /// List of Consents + /// + [JsonProperty(PropertyName = "Consents")] + public List Consents {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/EventBasedMultiFactorToken.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/EventBasedMultiFactorToken.cs new file mode 100644 index 0000000..2077c01 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/EventBasedMultiFactorToken.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition for SecondFactorValidationToken + /// + public class EventBasedMultiFactorToken + { + /// + /// second factor validation token + /// + [JsonProperty(PropertyName = "SecondFactorValidationToken")] + public string SecondFactorValidationToken {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByEmailModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByEmailModel.cs new file mode 100644 index 0000000..886b510 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByEmailModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition for Forgot Pin Link By Email API + /// + public class ForgotPINLinkByEmailModel + { + /// + /// user's email + /// + [JsonProperty(PropertyName = "Email")] + public string Email {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByUserNameModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByUserNameModel.cs new file mode 100644 index 0000000..e493234 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINLinkByUserNameModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition for Forgot Pin Link By UserName API + /// + public class ForgotPINLinkByUserNameModel + { + /// + /// Username of the user + /// + [JsonProperty(PropertyName = "UserName")] + public string UserName {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINOtpByPhoneModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINOtpByPhoneModel.cs new file mode 100644 index 0000000..1e433ee --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ForgotPINOtpByPhoneModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition for Forgot Pin Otp By Phone API + /// + public class ForgotPINOtpByPhoneModel + { + /// + /// New Phone Number + /// + [JsonProperty(PropertyName = "Phone")] + public string Phone {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/LoginByPINModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/LoginByPINModel.cs new file mode 100644 index 0000000..0a7ab61 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/LoginByPINModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for LoginByPin API + /// + public class LoginByPINModel + { + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/PINAuthEventBasedAuthModelWithLockout.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/PINAuthEventBasedAuthModelWithLockout.cs new file mode 100644 index 0000000..fbce079 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/PINAuthEventBasedAuthModelWithLockout.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for PIN + /// + public class PINAuthEventBasedAuthModelWithLockout + { + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/PINModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/PINModel.cs new file mode 100644 index 0000000..cb783cc --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/PINModel.cs @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for PinInfo + /// + public class PINModel + { + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + /// + /// possible values are true/false/null + /// + [JsonProperty(PropertyName = "Skipped")] + public bool? Skipped {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/PINRequiredModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/PINRequiredModel.cs new file mode 100644 index 0000000..e69a73d --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/PINRequiredModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition for PIN + /// + public class PINRequiredModel + { + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByEmailAndOtpModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByEmailAndOtpModel.cs new file mode 100644 index 0000000..64b6903 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByEmailAndOtpModel.cs @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Email and Otp API + /// + public class ResetPINByEmailAndOtpModel:LockoutModel + { + /// + /// user's email + /// + [JsonProperty(PropertyName = "Email")] + public string Email {get;set;} + + /// + /// The Verification Code + /// + [JsonProperty(PropertyName = "Otp")] + public string Otp {get;set;} + + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByPhoneAndOTPModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByPhoneAndOTPModel.cs new file mode 100644 index 0000000..d45370d --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByPhoneAndOTPModel.cs @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Phone and Otp API + /// + public class ResetPINByPhoneAndOTPModel:LockoutModel + { + /// + /// The Verification Code + /// + [JsonProperty(PropertyName = "Otp")] + public string Otp {get;set;} + + /// + /// New Phone Number + /// + [JsonProperty(PropertyName = "Phone")] + public string Phone {get;set;} + + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByResetToken.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByResetToken.cs new file mode 100644 index 0000000..1710312 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByResetToken.cs @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Reset Token API + /// + public class ResetPINByResetToken + { + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + /// + /// reset token received in the email + /// + [JsonProperty(PropertyName = "ResetToken")] + public string ResetToken {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswer.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswer.cs new file mode 100644 index 0000000..8cc27b8 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswer.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question API + /// + public class ResetPINBySecurityQuestionAnswer + { + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + /// + /// Valid JSON object of Unique Security Question ID and Answer of set Security Question. It is only required for locked accounts when logging in. Details about this feature + /// + [JsonProperty(PropertyName = "SecurityAnswer")] + public Dictionary SecurityAnswer {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndEmailModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndEmailModel.cs new file mode 100644 index 0000000..feade3a --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndEmailModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question and Email API + /// + public class ResetPINBySecurityQuestionAnswerAndEmailModel:ResetPINBySecurityQuestionAnswer + { + /// + /// user's email + /// + [JsonProperty(PropertyName = "Email")] + public string Email {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndPhoneModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndPhoneModel.cs new file mode 100644 index 0000000..bcdefcc --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndPhoneModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question and Phone API + /// + public class ResetPINBySecurityQuestionAnswerAndPhoneModel:ResetPINBySecurityQuestionAnswer + { + /// + /// New Phone Number + /// + [JsonProperty(PropertyName = "Phone")] + public string Phone {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndUsernameModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndUsernameModel.cs new file mode 100644 index 0000000..b19d0fe --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINBySecurityQuestionAnswerAndUsernameModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Security Question and UserName API + /// + public class ResetPINBySecurityQuestionAnswerAndUsernameModel:ResetPINBySecurityQuestionAnswer + { + /// + /// Username of the user + /// + [JsonProperty(PropertyName = "Username")] + public string Username {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByUsernameAndOtpModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByUsernameAndOtpModel.cs new file mode 100644 index 0000000..ab2043f --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ResetPINByUsernameAndOtpModel.cs @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Model Class containing Definition of payload for Reset Pin By Username and Otp API + /// + public class ResetPINByUsernameAndOtpModel:LockoutModel + { + /// + /// The Verification Code + /// + [JsonProperty(PropertyName = "Otp")] + public string Otp {get;set;} + + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + /// + /// Username of the user + /// + [JsonProperty(PropertyName = "Username")] + public string Username {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/UpdateUidModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/UpdateUidModel.cs new file mode 100644 index 0000000..e8e9070 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/UpdateUidModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.RequestModels + +{ + + /// + /// Payload containing Update UID + /// + public class UpdateUidModel + { + /// + /// New Uid + /// + [JsonProperty(PropertyName = "NewUid")] + public string NewUid {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/UserProfileUpdateModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/UserProfileUpdateModel.cs index 716c280..48c26b2 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/UserProfileUpdateModel.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/UserProfileUpdateModel.cs @@ -136,6 +136,12 @@ public class UserProfileUpdateModel:OptionalReCaptchaModel [JsonProperty(PropertyName = "Email")] public List Email {get;set;} + /// + /// Array of Objects,string represents SourceId,Source + /// + [JsonProperty(PropertyName = "ExternalIds")] + public List ExternalIds {get;set;} + /// /// External User Login Id /// @@ -185,7 +191,7 @@ public class UserProfileUpdateModel:OptionalReCaptchaModel public string FullName {get;set;} /// - /// + /// Array of Objects,string represents Id,Name,Category,CreatedDate /// [JsonProperty(PropertyName = "Games")] public List Games {get;set;} @@ -292,12 +298,6 @@ public class UserProfileUpdateModel:OptionalReCaptchaModel [JsonProperty(PropertyName = "JobBookmarks")] public List JobBookmarks {get;set;} - /// - /// Object, string represents KloutId and double represents Score - /// - [JsonProperty(PropertyName = "KloutScore")] - public KloutProfile KloutScore {get;set;} - /// /// language known by user's /// @@ -400,6 +400,12 @@ public class UserProfileUpdateModel:OptionalReCaptchaModel [JsonProperty(PropertyName = "PhoneNumbers")] public List PhoneNumbers {get;set;} + /// + /// PIN Info + /// + [JsonProperty(PropertyName = "PINInfo")] + public PINModel PINInfo {get;set;} + /// /// Array of Objects,strings Name and boolean IsPrimary /// diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/AccessToken.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/AccessToken.cs index 8685698..171ad9f 100644 --- a/Source/LoginRadiusSDK.V2/Models/ResponseModels/AccessToken.cs +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/AccessToken.cs @@ -34,6 +34,18 @@ public class AccessToken [JsonProperty(PropertyName = "refresh_token")] public Guid? Refresh_Token {get;set;} + /// + /// session token expiry time + /// + [JsonProperty(PropertyName = "session_expires_in")] + public DateTime? Session_expires_in {get;set;} + + /// + /// session token of user + /// + [JsonProperty(PropertyName = "session_token")] + public Guid? Session_token {get;set;} + } /// diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentLogsResponseModel.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentLogsResponseModel.cs new file mode 100644 index 0000000..71e07a0 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentLogsResponseModel.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containing consent logs + /// + public class ConsentLogsResponseModel + { + /// + /// List of consent logs + /// + [JsonProperty(PropertyName = "ConsentLogs")] + public List ConsentLogs {get;set;} + + /// + /// UID, the unified identifier for each user account + /// + [JsonProperty(PropertyName = "Uid")] + public string Uid {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentOption.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentOption.cs new file mode 100644 index 0000000..534117a --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentOption.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containing consent information + /// + public class ConsentOption + { + /// + /// Consent Accept on Date + /// + [JsonProperty(PropertyName = "AcceptOnDate")] + public DateTime? AcceptOnDate {get;set;} + + /// + /// Consent Option Id + /// + [JsonProperty(PropertyName = "ConsentOptionId")] + public string ConsentOptionId {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfile.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfile.cs new file mode 100644 index 0000000..ad369dd --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfile.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containing consent profile + /// + public class ConsentProfile + { + /// + /// List of consent version + /// + [JsonProperty(PropertyName = "AcceptedConsentVersions")] + public List AcceptedConsentVersions {get;set;} + + /// + /// List of Consents + /// + [JsonProperty(PropertyName = "Consents")] + public List Consents {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLog.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLog.cs new file mode 100644 index 0000000..eb964ae --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLog.cs @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +using LoginRadiusSDK.V2.Models.Enums; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containing consent profile logs + /// + public class ConsentProfileLog + { + /// + /// Consent ID + /// + [JsonProperty(PropertyName = "ConsentId")] + public string ConsentId {get;set;} + + /// + /// ConsentProfileActions + /// + [JsonProperty(PropertyName = "Event")] + public ConsentProfileActions Event {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLogs.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLogs.cs new file mode 100644 index 0000000..d089382 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileLogs.cs @@ -0,0 +1,70 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Newtonsoft.Json; +using LoginRadiusSDK.V2.Models.Enums; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containg consent profile logs + /// + public class ConsentProfileLogs + { + /// + /// List of consent logs + /// + [JsonProperty(PropertyName = "ConsentLogs")] + public List ConsentLogs {get;set;} + + /// + /// List of consetforms version + /// + [JsonProperty(PropertyName = "CurrentConsentFormsVersions")] + public List CurrentConsentFormsVersions {get;set;} + + /// + /// Host name + /// + [JsonProperty(PropertyName = "Host")] + public string Host {get;set;} + + /// + /// ID of the User + /// + [JsonProperty(PropertyName = "Id")] + public string Id {get;set;} + + /// + /// users ip address + /// + [JsonProperty(PropertyName = "IP")] + public string IP {get;set;} + + /// + /// Logged On Date + /// + [JsonProperty(PropertyName = "LoggedOnDate")] + public DateTime LoggedOnDate {get;set;} + + /// + /// Consent Profile Update Type + /// + [JsonProperty(PropertyName = "UpdateType")] + public ConsentProfileUpdateType UpdateType {get;set;} + + /// + /// UserAgent + /// + [JsonProperty(PropertyName = "UserAgent")] + public string UserAgent {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileValidResponse.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileValidResponse.cs new file mode 100644 index 0000000..1e93ce2 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentProfileValidResponse.cs @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containing consent profile + /// + public class ConsentProfileValidResponse + { + /// + /// Consent Profile + /// + [JsonProperty(PropertyName = "ConsentProfile")] + public ConsentProfile ConsentProfile {get;set;} + + /// + /// check data is validate + /// + [JsonProperty(PropertyName = "IsValid")] + public bool IsValid {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentVersions.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentVersions.cs new file mode 100644 index 0000000..b8257f6 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/ConsentVersions.cs @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels + +{ + + /// + /// Response containing consent version information + /// + public class ConsentVersions + { + /// + /// Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject + /// + [JsonProperty(PropertyName = "Event")] + public string Event {get;set;} + + /// + /// true/false + /// + [JsonProperty(PropertyName = "IsCustom")] + public bool? IsCustom {get;set;} + + /// + /// privacy policy version + /// + [JsonProperty(PropertyName = "Version")] + public int? Version {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/DeleteResponse.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/DeleteResponse.cs index 1480601..f17acad 100644 --- a/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/DeleteResponse.cs +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/DeleteResponse.cs @@ -21,5 +21,11 @@ public class DeleteResponse [JsonProperty(PropertyName = "IsDeleted")] public bool IsDeleted {get;set;} + /// + /// Number of Records Deleted + /// + [JsonProperty(PropertyName = "RecordsDeleted")] + public int? RecordsDeleted {get;set;} + } } \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PINInformation.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PINInformation.cs new file mode 100644 index 0000000..85dde4a --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PINInformation.cs @@ -0,0 +1,44 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels.OtherObjects + +{ + + /// + /// Response Model Class containing Definition of PIN Information + /// + public class PINInformation + { + /// + /// Last PIN Change Date + /// + [JsonProperty(PropertyName = "LastPINChangeDate")] + public DateTime? LastPINChangeDate {get;set;} + + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public string PIN {get;set;} + + /// + /// possible values are true/false/null + /// + [JsonProperty(PropertyName = "Skipped")] + public bool? Skipped {get;set;} + + /// + /// Skipped Date + /// + [JsonProperty(PropertyName = "SkippedDate")] + public DateTime? SkippedDate {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/DataValue.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/DataValue.cs new file mode 100644 index 0000000..b7299ae --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/DataValue.cs @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels.UserProfile.Objects + +{ + + /// + /// Response Model Class containing Definition of Registration Data + /// + public class DataValue + { + /// + /// Registration Data Source + /// + [JsonProperty(PropertyName = "DataSource")] + public string DataSource {get;set;} + + /// + /// Value of the dropdown member + /// + [JsonProperty(PropertyName = "Value")] + public RegistrationDataValueObject Value {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationData.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationData.cs new file mode 100644 index 0000000..eff83bd --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationData.cs @@ -0,0 +1,26 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels.UserProfile.Objects + +{ + + /// + /// Response containing Definition for Registration Data + /// + public class RegistrationData + { + /// + /// Data + /// + [JsonProperty(PropertyName = "Data")] + public List Data {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationDataValueObject.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationDataValueObject.cs new file mode 100644 index 0000000..186ef42 --- /dev/null +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/Objects/RegistrationDataValueObject.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Created by LoginRadius Development Team +// Copyright 2019 LoginRadius Inc. All rights reserved. +// +//----------------------------------------------------------------------- + +using Newtonsoft.Json; +namespace LoginRadiusSDK.V2.Models.ResponseModels.UserProfile.Objects + +{ + + /// + /// Response containing Definition for Registration Data value + /// + public class RegistrationDataValueObject + { + /// + /// ID of the User + /// + [JsonProperty(PropertyName = "Id")] + public string Id {get;set;} + + } +} \ No newline at end of file diff --git a/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/UserProfile.cs b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/UserProfile.cs index 14c3079..ca9e6ae 100644 --- a/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/UserProfile.cs +++ b/Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/UserProfile.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using Newtonsoft.Json; using LoginRadiusSDK.V2.Models.ResponseModels.UserProfile.Objects; +using LoginRadiusSDK.V2.Models.ResponseModels.OtherObjects; namespace LoginRadiusSDK.V2.Models.ResponseModels.UserProfile { @@ -18,6 +19,12 @@ namespace LoginRadiusSDK.V2.Models.ResponseModels.UserProfile /// public class UserProfile:SocialUserProfile { + /// + /// Response containing consent profile + /// + [JsonProperty(PropertyName = "ConsentProfile")] + public ConsentProfile ConsentProfile {get;set;} + /// /// Custom fields as user set on LoginRadius Admin Console. /// @@ -138,12 +145,24 @@ public class UserProfile:SocialUserProfile [JsonProperty(PropertyName = "PhoneIdVerified")] public bool? PhoneIdVerified {get;set;} + /// + /// PIN of user + /// + [JsonProperty(PropertyName = "PIN")] + public PINInformation PIN {get;set;} + /// /// Object type by default false, string represents Version, AcceptSource and datetime represents AcceptDateTime /// [JsonProperty(PropertyName = "PrivacyPolicy")] public AcceptedPrivacyPolicy PrivacyPolicy {get;set;} + /// + /// User Registartion Data + /// + [JsonProperty(PropertyName = "RegistrationData")] + public RegistrationData RegistrationData {get;set;} + /// /// Provider with which user registered /// @@ -156,6 +175,12 @@ public class UserProfile:SocialUserProfile [JsonProperty(PropertyName = "RegistrationSource")] public string RegistrationSource {get;set;} + /// + /// + /// + [JsonProperty(PropertyName = "Roles")] + public List Roles {get;set;} + /// /// UID, the unified identifier for each user account ///