From de509737e6a8d7b7f62372b4a32e59225e00d175 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Wed, 22 May 2024 19:51:35 -0400 Subject: [PATCH] Include GitLab token in APK request (#1622) --- lib/app_sources/gitlab.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/app_sources/gitlab.dart b/lib/app_sources/gitlab.dart index 49f7246..7383f66 100644 --- a/lib/app_sources/gitlab.dart +++ b/lib/app_sources/gitlab.dart @@ -111,6 +111,14 @@ class GitLab extends AppSource { } } + @override + Future apkUrlPrefetchModifier(String apkUrl, String standardUrl, + Map additionalSettings) async { + String? PAT = await getPATIfAny(hostChanged ? additionalSettings : {}); + String optionalAuth = (PAT != null) ? 'private_token=$PAT' : ''; + return '$apkUrl?$optionalAuth'; + } + @override Future getLatestAPKDetails( String standardUrl,