From e98e069ca6f26c2e85456b1b068999c3556268fa Mon Sep 17 00:00:00 2001 From: nikolai-frolov Date: Wed, 13 Oct 2021 15:56:14 +0300 Subject: [PATCH] Remove Access Token usage --- packages-generation/manifest-validator.ps1 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages-generation/manifest-validator.ps1 b/packages-generation/manifest-validator.ps1 index e2fd71c..c50bceb 100644 --- a/packages-generation/manifest-validator.ps1 +++ b/packages-generation/manifest-validator.ps1 @@ -1,6 +1,5 @@ param ( - [Parameter(Mandatory)][string] $ManifestPath, - [string] $AccessToken + [Parameter(Mandatory)][string] $ManifestPath ) $Global:validationFailed = $false @@ -10,7 +9,7 @@ function Publish-Error { [string] $ErrorDescription, [object] $Exception ) - + Write-Output "::error ::$ErrorDescription" if (-not [string]::IsNullOrEmpty($Exception)) { @@ -20,12 +19,11 @@ function Publish-Error { } function Test-DownloadUrl { - param([string] $DownloadUrl) + param( + [string] $DownloadUrl + ) + $request = [System.Net.WebRequest]::Create($DownloadUrl) - if ($AccessToken) { - $authorizationHeaderValue = "Basic $AccessToken" - $request.Headers.Add("Authorization", $authorizationHeaderValue) - } try { $response = $request.GetResponse() return ([int]$response.StatusCode -eq 200)