feat: refactor authentication handling to use new ApiAuthModel and update related components

This commit is contained in:
Udhay-Adithya
2025-06-12 18:18:37 +05:30
parent 6a2d1fd534
commit 449e32521e
13 changed files with 214 additions and 213 deletions

View File

@@ -17,8 +17,7 @@ final httpClientManager = HttpClientManager();
Future<(HttpResponse?, Duration?, String?)> sendHttpRequest(
String requestId,
APIType apiType,
APIAuthModel? authData,
APIAuthType apiAuthType,
ApiAuthModel? authData,
HttpRequestModel requestModel, {
SupportedUriSchemes defaultUriScheme = kDefaultUriScheme,
bool noSSL = false,
@@ -29,8 +28,7 @@ Future<(HttpResponse?, Duration?, String?)> sendHttpRequest(
final client = httpClientManager.createClient(requestId, noSSL: noSSL);
// Handle authentication
final authenticatedRequestModel =
handleAuth(requestModel, apiAuthType, authData);
final authenticatedRequestModel = handleAuth(requestModel, authData);
(Uri?, String?) uriRec = getValidRequestUri(
authenticatedRequestModel.url,