mirror of
https://github.com/bitwarden/server
synced 2025-12-22 03:03:33 +00:00
[SG-648] BEEEP-Refactor DuoApi class to use Httpclient (#2691)
* Started work on refactoring class * Added duo api respons model * Made httpclient version of APICall * Added more properties to response model * Refactored duo api class to use httpclient * Removed unuseful comments * Fixed lint formatting
This commit is contained in:
@@ -11,7 +11,6 @@ using Bit.Core.Repositories;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Utilities.Duo;
|
||||
using Fido2NetLib;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
@@ -153,7 +152,7 @@ public class TwoFactorController : Controller
|
||||
try
|
||||
{
|
||||
var duoApi = new DuoApi(model.IntegrationKey, model.SecretKey, model.Host);
|
||||
duoApi.JSONApiCall<object>("GET", "/auth/v2/check");
|
||||
await duoApi.JSONApiCall("GET", "/auth/v2/check");
|
||||
}
|
||||
catch (DuoException)
|
||||
{
|
||||
@@ -210,7 +209,7 @@ public class TwoFactorController : Controller
|
||||
try
|
||||
{
|
||||
var duoApi = new DuoApi(model.IntegrationKey, model.SecretKey, model.Host);
|
||||
duoApi.JSONApiCall<object>("GET", "/auth/v2/check");
|
||||
await duoApi.JSONApiCall("GET", "/auth/v2/check");
|
||||
}
|
||||
catch (DuoException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user