duo_api_csharp icon indicating copy to clipboard operation
duo_api_csharp copied to clipboard

Update for easier .NET Core integration.

Open VictorioBerra opened this issue 9 months ago • 7 comments

Hello, I would like to integrate this into an existing .NET Core CLI. I am struggling to do this due to the reliance on namespaces like System.Web.Script.Serialization and System.Web.

Detailed Description

For example HttpUtility.UrlEncode could be replaced with Uri.EscapeDataString to remove reliance on System.Web.

Another odd implementation detail is usage of System.Web.Script.Serialization.JavaScriptSerializer VS something like System.Text.Json or the battle-tested Newtonsoft.Json.

Use Case

The whole point of this library is to make calling the Duo API simpler (which is anything but simple thanks to HMAC auth as opposed to OAuth2 (JWTs) but that is another discussion).

DuoSecurity would benefit from businesses having easier implementation of Duo. Many enterprises live on C#/.NET. There is a lot of business value to having a developer go from 0 to MVP by using a modern API client hosted on something like NuGet.

Duo's new DuoUniversal client is a prime example of a modern and well implemented client even showcasing ASP.NET Core web app examples leveraging Dependency Injection.

Workarounds

None at this time. Currently working to replace code with NETStandard/NETCore equivalents. Or looking into third party clients.

VictorioBerra avatar Sep 22 '23 16:09 VictorioBerra