Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LoginRadius/dot-net-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 11.0.0
Choose a base ref
...
head repository: LoginRadius/dot-net-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 3,267 additions and 3,892 deletions.
  1. +25 −0 .github/workflows/main.yml
  2. +203 −1 CHANGELOG.md
  3. +42 −0 CONTRIBUTION.md
  4. +1 −1 LICENSE
  5. +1,030 −835 README.md
  6. +13 −16 Samples/dot-net-demo/dot-net-demo.sln
  7. +7 −6 Samples/dot-net-demo/dot-net-demo/Controllers/HomeController.cs
  8. +1 −1 Samples/dot-net-demo/dot-net-demo/Views/Home/EmailVerification.cshtml
  9. +1 −1 Samples/dot-net-demo/dot-net-demo/Views/Home/Index.cshtml
  10. +1 −1 Samples/dot-net-demo/dot-net-demo/Views/Home/LoginScreen.cshtml
  11. +2 −2 Samples/dot-net-demo/dot-net-demo/Views/Home/Profile.cshtml
  12. +1 −1 Samples/dot-net-demo/dot-net-demo/Views/Home/ResetPassword.cshtml
  13. +1 −1 Samples/dot-net-demo/dot-net-demo/dot-net-demo.csproj
  14. +2 −2 Samples/dot-net-demo/dot-net-demo/wwwroot/js/indexControl.js
  15. +0 −2 Samples/dot-net-demo/dot-net-demo/wwwroot/js/jquery-3.3.1.min.js
  16. +2 −0 Samples/dot-net-demo/dot-net-demo/wwwroot/js/jquery-3.6.0.min.js
  17. +2 −2 Samples/dot-net-demo/dot-net-demo/wwwroot/js/profileControl.js
  18. +8 −11 Source/LoginRadiusSDK.V2.sln
  19. +90 −5 Source/LoginRadiusSDK.V2/Api/Account/AccountApi.cs
  20. +1 −1 Source/LoginRadiusSDK.V2/Api/Account/RoleApi.cs
  21. +1 −1 Source/LoginRadiusSDK.V2/Api/Account/SottApi.cs
  22. +1 −4 Source/LoginRadiusSDK.V2/Api/Advanced/ConfigurationApi.cs
  23. +1 −1 Source/LoginRadiusSDK.V2/Api/Advanced/ConsentManagementApi.cs
  24. +2 −2 Source/LoginRadiusSDK.V2/Api/Advanced/CustomObjectApi.cs
  25. +0 −228 Source/LoginRadiusSDK.V2/Api/Advanced/CustomRegistrationDataApi.cs
  26. +548 −111 Source/LoginRadiusSDK.V2/Api/Advanced/MultiFactorAuthenticationApi.cs
  27. +129 −32 Source/LoginRadiusSDK.V2/Api/Advanced/ReAuthenticationApi.cs
  28. +1 −1 Source/LoginRadiusSDK.V2/Api/Advanced/WebHookApi.cs
  29. +170 −48 Source/LoginRadiusSDK.V2/Api/Authentication/AuthenticationApi.cs
  30. +8 −2 Source/LoginRadiusSDK.V2/Api/Authentication/OneTouchLoginApi.cs
  31. +10 −4 Source/LoginRadiusSDK.V2/Api/Authentication/PINAuthenticationApi.cs
  32. +69 −4 Source/LoginRadiusSDK.V2/Api/Authentication/PasswordLessLoginApi.cs
  33. +65 −17 Source/LoginRadiusSDK.V2/Api/Authentication/PhoneAuthenticationApi.cs
  34. +1 −1 Source/LoginRadiusSDK.V2/Api/Authentication/RiskBasedAuthenticationApi.cs
  35. +42 −0 Source/LoginRadiusSDK.V2/Api/Authentication/SlidingTokenApi.cs
  36. +1 −1 Source/LoginRadiusSDK.V2/Api/Authentication/SmartLoginApi.cs
  37. +101 −17 Source/LoginRadiusSDK.V2/Api/Social/NativeSocialApi.cs
  38. +9 −781 Source/LoginRadiusSDK.V2/Api/Social/SocialApi.cs
  39. +3 −2 Source/LoginRadiusSDK.V2/BaseConstants.cs
  40. +1 −0 Source/LoginRadiusSDK.V2/Common/ApiResponse.cs
  41. +2 −2 Source/LoginRadiusSDK.V2/Common/JwtTokenValidation.cs
  42. +1 −2 Source/LoginRadiusSDK.V2/Common/JwtValidationParameters.cs
  43. +25 −14 Source/LoginRadiusSDK.V2/Common/LoginRadiusResource.cs
  44. +40 −11 Source/LoginRadiusSDK.V2/Common/LoginRadiusSecureOneTimeToken.cs
  45. +4 −2 Source/LoginRadiusSDK.V2/Common/Sott.cs
  46. +20 −1 Source/LoginRadiusSDK.V2/Exception/ConnectionException.cs
  47. +27 −4 Source/LoginRadiusSDK.V2/Exception/LoginRadiusException.cs
  48. +20 −12 Source/LoginRadiusSDK.V2/Http/HttpConnection.cs
  49. +6 −1 Source/LoginRadiusSDK.V2/LRConfigConstants.cs
  50. +3 −3 Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj
  51. +1 −0 Source/LoginRadiusSDK.V2/LoginRadiusSDKGlobalConfig.cs
  52. +6 −1 Source/LoginRadiusSDK.V2/Manager/ConfigManager.cs
  53. +24 −6 Source/LoginRadiusSDK.V2/Manager/SDKConfigHandler.cs
  54. +1 −1 Source/LoginRadiusSDK.V2/Models/RequestModels/AuthUserRegistrationModel.cs
  55. +43 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/CaptchaModel.cs
  56. +6 −6 ....V2/Models/{ResponseModels/OtherObjects/RegistrationDataField.cs → RequestModels/EmailIdModel.cs}
  57. +6 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/EmailVerificationByOtpModel.cs
  58. +7 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/ExternalIds.cs
  59. +1 −1 Source/LoginRadiusSDK.V2/Models/RequestModels/Languages.cs
  60. +55 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/MultiEmailToken.cs
  61. +5 −5 ...s/{MultiFactorAuthModelByGoogleAuthenticatorCode.cs → MultiFactorAuthModelByAuthenticatorCode.cs}
  62. +26 −0 ...e/LoginRadiusSDK.V2/Models/RequestModels/MultiFactorAuthModelByAuthenticatorCodeSecurityAnswer.cs
  63. +9 −9 ...s/{ResponseModels/OtherObjects/PageCodeName.cs → RequestModels/MultiFactorAuthModelByEmailOtp.cs}
  64. +31 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/MultiFactorAuthModelByEmailOtpWithLockout.cs
  65. +15 −9 ...diusSDK.V2/Models/{ResponseModels/OtherObjects/CountryCodeName.cs → RequestModels/MultiSmsOtp.cs}
  66. +1 −1 Source/LoginRadiusSDK.V2/Models/RequestModels/PINModel.cs
  67. +12 −12 ...eModels/OtherObjects/StatusUpdateStats.cs → RequestModels/PasswordLessLoginByEmailAndOtpModel.cs}
  68. +37 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/PasswordLessLoginByUserNameAndOtpModel.cs
  69. +1 −20 Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaModel.cs
  70. +31 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/ReauthByEmailOtpModel.cs
  71. +0 −55 Source/LoginRadiusSDK.V2/Models/RequestModels/RegistrationDataCreateModel.cs
  72. +0 −61 Source/LoginRadiusSDK.V2/Models/RequestModels/RegistrationDataUpdateModel.cs
  73. +9 −9 ...nseModels/OtherObjects/Speciality.cs → RequestModels/SecurityQuestionAnswerModelByAccessToken.cs}
  74. +5 −5 .../Models/RequestModels/{RegistrationDataCreateModelList.cs → SecurityQuestionAnswerUpdateModel.cs}
  75. +31 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/SecurityQuestionModel.cs
  76. +31 −0 Source/LoginRadiusSDK.V2/Models/RequestModels/SecurityQuestionOptionalModel.cs
  77. +0 −61 Source/LoginRadiusSDK.V2/Models/RequestModels/StatusModel.cs
  78. +1 −1 Source/LoginRadiusSDK.V2/Models/RequestModels/UserProfileUpdateModel.cs
  79. +25 −0 Source/LoginRadiusSDK.V2/Models/ResponseModels/EmailOtpStatus.cs
  80. +32 −1 Source/LoginRadiusSDK.V2/Models/ResponseModels/MultiFactorAuthenticationSettingsResponse.cs
  81. +13 −11 Source/LoginRadiusSDK.V2/Models/ResponseModels/{ShortUrlResponse.cs → MultiToken.cs}
  82. +0 −91 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Album.cs
  83. +0 −73 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Audio.cs
  84. +0 −103 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/CheckIn.cs
  85. +0 −91 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Contact.cs
  86. +0 −32 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/CursorResponse.cs
  87. +0 −85 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Events.cs
  88. +0 −79 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Group.cs
  89. +0 −55 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Like.cs
  90. +7 −1 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PINInformation.cs
  91. +0 −182 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Page.cs
  92. +0 −31 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PageCategoryList.cs
  93. +0 −43 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PageCover.cs
  94. +0 −67 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/PageLocations.cs
  95. +0 −110 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Photo.cs
  96. +0 −85 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Post.cs
  97. +8 −8 ...els/ResponseModels/OtherObjects/{FacebookAlbumImages.cs → PostResponseResendEmailVerification.cs}
  98. +0 −74 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/RegistrationDataFieldBasic.cs
  99. +0 −73 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Status.cs
  100. +0 −91 Source/LoginRadiusSDK.V2/Models/ResponseModels/OtherObjects/Video.cs
  101. +0 −19 Source/LoginRadiusSDK.V2/Models/ResponseModels/PostMethodResponse.cs
  102. +1 −1 Source/LoginRadiusSDK.V2/Models/ResponseModels/SMSResponseData.cs
  103. +2 −2 Source/LoginRadiusSDK.V2/Models/ResponseModels/UserActiveSession.cs
  104. +4 −10 ...s/ResponseModels/{StatusUpdateResponse.cs → UserProfile/Objects/OrganizationResponseInProfile.cs}
  105. +8 −2 Source/LoginRadiusSDK.V2/Models/ResponseModels/UserProfile/UserProfile.cs
  106. +8 −11 Source/LoginRadiusSDK.V2/Util/QueryParameters.cs
  107. +20 −0 Source/LoginRadiusSDK.V2/Util/Serialization/JsonFormatter.cs
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish LoginRadius SDK on Nuget Package manager
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Build with dotnet
run: dotnet build Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj --configuration Release
- name: Test with dotnet
run: dotnet test Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj
- name: Pack with dotnet
run: dotnet pack Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj --output nuget-packages --configuration Release
- name: Push with dotnet
run: dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate




204 changes: 203 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,214 @@
> **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 11.6.0

Release on **July 02, 2024**

## Added following APIs:
- `MFAValidateAuthenticatorCode`
- `MFAVerifyAuthenticatorCode`
- `RevokeAllRefreshToken `
- `MultipurposeEmailTokenGeneration`
- `MultipurposeSMSOTPGeneration`
- `MFAReAuthenticateByAuthenticatorCode`
- `AuthSendVerificationEmailForLinkingSocialProfiles `
- `SlidingAccessToken`
- `AccessTokenViaCustomJWTToken`
- `MFAResetAuthenticatorByToken`
- `MFAResetAuthenticatorByUid`

## Enhancements
- Added `isVoiceOtp` parameter in `ResetPhoneIDVerificationByUid` API
- Added `isVoiceOtp` parameter in `MFAConfigureByAccessToken` API
- Added `isVoiceOtp` and `options` parameter in `MFAUpdatePhoneNumberByToken` API
- Added `isVoiceOtp`, `emailTemplate2FA` and `options` parameter in `MFALoginByEmail` API
- Added `isVoiceOtp` and `emailTemplate2FA` parameter in `MFALoginByUserName` API
- Added `isVoiceOtp` , `emailTemplate2FA` and `options` parameter in `MFALoginByPhone` API
- Added `isVoiceOtp` and `options` parameter in `MFAUpdatePhoneNumber` API
- Added `isVoiceOtp` parameter in `MFAResendOTP` API
- Added `isVoiceOtp` parameter in `MFAReAuthenticate` API
- Added `isVoiceOtp` and `options` parameter in `UpdateProfileByAccessToken` API
- Added `isVoiceOtp` parameter in `UserRegistrationByEmail` API
- Added `isVoiceOtp` parameter in `UserRegistrationByCaptcha` API
- Added `isVoiceOtp` parameter in `OneTouchLoginByPhone` API
- Added `isVoiceOtp` parameter in `PasswordlessLoginPhoneVerification` API
- Added `isVoiceOtp` parameter in `PasswordlessLoginByPhone` API
- Added `isVoiceOtp` parameter in `ForgotPasswordByPhoneOTP` API
- Added `isVoiceOtp` parameter in `PhoneVerificationByOTP` API
- Added `isVoiceOtp` parameter in `PhoneVerificationOTPByAccessToken` API
- Added `isVoiceOtp` parameter in `PhoneResendVerificationOTP` API
- Added `isVoiceOtp` parameter in `UpdatePhoneNumber` API
- Added `isVoiceOtp` and `emailTemplate` parameter in `UserRegistrationByPhone` API
- Added `isVoiceOtp` parameter in `SendForgotPINSMSByPhone` API
- Added `uuid` parameter in `VerifyEmail` API

## Removed the following parameter

-`smsTemplate2FA` parameter in `MFAConfigureByAccessToken` API



## Removed (Deprecated) APIs:
- `MFAValidateGoogleAuthCode`
- `MFAReAuthenticateByGoogleAuth`
- `MFAResetGoogleAuthByToken `
- `MFAResetGoogleAuthenticatorByUid`
- `MFAUpdateByAccessToken`


# Version 11.5.0

Release on **January 23, 2023**


## Enhancements
- Added `emailTemplate` parameter in `UserRegistrationByPhone` Api

## Removed (Deprecated) APIs:
- `AuthGetRegistrationData`
- `ValidateRegistrationDataCode`
- `GetRegistrationData`
- `AddRegistrationData`
- `UpdateRegistrationData`
- `DeleteRegistrationData`
- `DeleteAllRecordsByDataSource`
- `GetAccessTokenByVkontakteAccessToken`
- `GetAlbum`
- `GetAlbumsWithCursor`
- `GetAudios`
- `GetAudiosWithCursor`
- `GetCheckIns`
- `GetCheckInsWithCursor`
- `GetContacts`
- `GetEvents`
- `GetEventsWithCursor`
- `GetFollowings`
- `GetFollowingsWithCursor`
- `GetGroups`
- `GetGroupsWithCursor`
- `GetLikes`
- `GetLikesWithCursor`
- `GetMentions`
- `PostMessage`
- `GetPage`
- `GetPhotos`
- `GetPosts`
- `StatusPosting`
- `TrackableStatusPosting`
- `GetTrackableStatusStats`
- `TrackableStatusFetching`
- `GetVideos`
- `GetRefreshedSocialUserProfile`

# Version 11.4.1

Release on **August 04, 2022**

## Enhancements

- Updated Newtonsoft.Json library 12.0.2 to 13.0.1

# Version 11.4.0

Release on **June 01, 2022**

## Enhancements

- Added additional parameter `TimeDifference` & `getLrServerTime` in `GetSott` function.
- Enhancement in `README.md` file.

# Version 11.3.0

Release on **January 28, 2022**

## Enhancements

- Added a feature to add ApiKey and ApiSecret directly in LoginRadius manual SOTT generation method.
- Code optimization for better performance.
- Improved the Exception handling for various connection-related exceptions.
- Added Licence and Contribution Guideline files.

## Breaking Changes

For developers migrating from v11.2.0, there will be 1 minor breaking change in terms of SDK implementation. In this version, we have added a feature to add ApiKey & ApiSecret directly into the manual SOTT generation method `GetSott()`.

# Version 11.2.0

Release on **September 7, 2021**

## Enhancements
- Minor code refactor.
- Support for appsettings.Environment.json : For example, the appsettings.Production.json and appsettings.Development.json files. The environment version of the file is loaded based on the IHostingEnvironment.EnvironmentName.
- Added X-Origin-IP header support.
- Added 429 error code handling for "Too Many Request in a particular time frame".
- Updated Jquery with latest version(3.6.0) in SDK Demo

## Added new multiple APIs for better user experience
- MFAEmailOtpByAccessToken
- MFAValidateEmailOtpByAccessToken
- MFAResetEmailOtpAuthenticatorByAccessToken
- MFASecurityQuestionAnswerByAccessToken
- MFAResetSecurityQuestionAuthenticatorByAccessToken
- MFAEmailOTP
- MFAValidateEmailOtp
- MFASecurityQuestionAnswer
- MFASecurityQuestionAnswerVerification
- MFAResetEmailOtpAuthenticatorByUid
- MFAResetSecurityQuestionAuthenticatorByUid
- ReAuthValidateEmailOtp
- ReAuthSendEmailOtp
- ReAuthBySecurityQuestion
- PasswordlessLoginVerificationByUserNameAndOTP
- PasswordlessLoginVerificationByEmailAndOTP
- GetProfileByPing
- GetAccessTokenByWeChatCode
- GetAccessTokenByAppleIdCode
- LinkSocialIdentitiesByPing (POST)
- linkSocialIdentities(POST)

## Removed APIs:

- GetSocialUserProfile
- linkSocialIdentity (PUT)
- getSocialIdentity (GET)

#### Added `EmailTemplate2FA` parameter in the following API
- MFALoginByEmail
- MFALoginByUserName
- MFALoginByPhone

#### Added `RbaBrowserEmailTemplate`, `RbaCityEmailTemplate` ,`RbaCountryEmailTemplate` , `RbaIpEmailTemplate` parameter in the following API
- MFAValidateOTPByPhone
- MFAValidateGoogleAuthCode
- MFAValidateBackupCode

#### Added `emailTemplate`, `verificationUrl` ,`welcomeEmailTemplate` parameter in the following API

- GetProfileByAccessToken

## Removed `smsTemplate2FA` parameter from the following API

- mfaValidateGoogleAuthCode

#### Added `isWeb` parameter in the following API
- RefreshAccessToken

#### Added `socialAppName` parameter in the following Native Social Login API
- GetAccessTokenByFacebookAccessToken
- GetAccessTokenByTwitterAccessToken
- GetAccessTokenByGoogleAccessToken
- GetAccessTokenByLinkedinAccessToken
- GetAccessTokenByAppleIdCode
- GetAccessTokenByGoogleAuthCode

# Version 11.0.0
Release on **March 05, 2021**

## Enhancements

- Updated all API Methods in async/await to solving thread performance or scalability problems.
- Updated all API Method in async/await to solving thread performance or scalability problems.
- Added new JWT Token Validate Method in SDK.

# Version 10.0.0
42 changes: 42 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing

[DotNet SDK](https://github.com/LoginRadius/dot-net-sdk) is [MIT](LICENSE) licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points, and other resources to make it easier to get your contribution accepted.

## Getting Started

- Fork the repository on GitHub.
- If you find any bug or Improvement in our existing code-base, please create a pull request as mentioned in Contribution Flow.


## Contribution Flow

This is a rough outline of what a contributor's workflow looks like:

- Create a separate branch from the `dev` branch to base your work.
- Make commits of logical units.
- Make sure your commit messages are in the proper format (see below).
- Push your changes to a topic branch in your fork of the repository.
- Submit a pull request to the original repository.
- **Please ensure that you raise a PR on the `dev` branch instead of `master`.**

#### Commit Messages

Please follow the below format while writing commit messages:

```
title: One line description about your change
<Blank Line>
description: An optional description of your changes.
```

Thanks for your contributions!

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

### Our Responsibilities

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 LoginRadius Inc.
Copyright (c) 2022 LoginRadius Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading