From 8ea534481181a063175f457082662fdcad9a41ff Mon Sep 17 00:00:00 2001 From: Mitchel Sellers Date: Tue, 29 Oct 2024 23:04:10 -0500 Subject: [PATCH] Addressed an issue with token duration usage. --- .../AzureCloudStorageProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs b/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs index a41f458..f238bd2 100644 --- a/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs +++ b/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs @@ -372,7 +372,7 @@ public string CreateSASUrl(string container, string objectName, int tokenDuratio BlobContainerName = container, BlobName = objectName, Resource = "b", - ExpiresOn = DateTimeOffset.UtcNow.AddHours(1) + ExpiresOn = DateTimeOffset.UtcNow.AddMinutes(tokenDuration) }; tokenBuilder.SetPermissions(BlobSasPermissions.Read); return blobClient.GenerateSasUri(tokenBuilder).ToString();