Skip to content

Commit f4ae369

Browse files
authored
Merge branch 'stg101/dynamicSas' into stg101/dynamicSas
2 parents 4a20e60 + ec472d8 commit f4ae369

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasImplUtilsTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
43
package com.azure.storage.common.implementation;
54

65
import org.junit.jupiter.api.BeforeEach;
@@ -12,7 +11,6 @@
1211
import java.util.stream.Collectors;
1312

1413
import static org.junit.jupiter.api.Assertions.assertEquals;
15-
import static org.junit.jupiter.api.Assertions.assertNotEquals;;
1614

1715
public class SasImplUtilsTests {
1816

@@ -51,8 +49,9 @@ public void formatRequestHeadersForSasSigningPopulatedHeaders() {
5149
requestHeaders.put(Constants.HeaderConstants.CONTENT_TYPE, "contentTypeValue");
5250
requestHeaders.put(Constants.HeaderConstants.CLIENT_REQUEST_ID, "clientRequestId");
5351

54-
String expected = "x-ms-encryption-key:encryptionKeyValue\n" + "Content-Encoding:contentEncodingValue\n"
55-
+ "Content-Type:contentTypeValue\n" + "x-ms-client-request-id:clientRequestId\n";
52+
String expected
53+
= String.join("\n", "x-ms-encryption-key:encryptionKeyValue", "Content-Encoding:contentEncodingValue",
54+
"Content-Type:contentTypeValue", "x-ms-client-request-id:clientRequestId");
5655

5756
String headers = SasImplUtils.formatRequestHeadersForSasSigning(requestHeaders);
5857
Integer newLineCount

sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,8 @@ public DataLakeServiceSasSignatureValues setDelegatedUserObjectId(String delegat
484484
* Optional. Beginning in version 2026-04-06, this value specifies Custom Request Headers to include in the SAS.
485485
* Any usage of the SAS must include these headers and values in the request.
486486
*
487+
* <p>Note: This parameter is only valid for user delegation SAS. </p>
488+
*
487489
* @return The custom request headers to be set when the SAS is used.
488490
*/
489491
public Map<String, String> getRequestHeaders() {
@@ -494,6 +496,8 @@ public Map<String, String> getRequestHeaders() {
494496
* Optional. Beginning in version 2026-04-06, this value specifies Custom Request Headers to include in the SAS.
495497
* Any usage of the SAS must include these headers and values in the request.
496498
*
499+
* <p>Note: This parameter is only valid for user delegation SAS. </p>
500+
*
497501
* @param requestHeaders The custom request headers to be set when the SAS is used.
498502
* @return the updated DataLakeServiceSasSignatureValues object
499503
*/
@@ -506,6 +510,8 @@ public DataLakeServiceSasSignatureValues setRequestHeaders(Map<String, String> r
506510
* Optional. Beginning in version 2026-04-06, this value specifies Custom Request Query Parameters to include in
507511
* the SAS. Any usage of the SAS must include these query parameters and values in the request.
508512
*
513+
* <p>Note: This parameter is only valid for user delegation SAS. </p>
514+
*
509515
* @return The custom query parameters to be set when the SAS is used.
510516
*/
511517
public Map<String, String> getRequestQueryParameters() {
@@ -516,6 +522,8 @@ public Map<String, String> getRequestQueryParameters() {
516522
* Optional. Beginning in version 2026-04-06, this value specifies Custom Request Query Parameters to include in
517523
* the SAS. Any usage of the SAS must include these query parameters and values in the request.
518524
*
525+
* <p>Note: This parameter is only valid for user delegation SAS. </p>
526+
*
519527
* @param requestQueryParameters The custom query parameters to be set when the SAS is used.
520528
* @return the updated DataLakeServiceSasSignatureValues object
521529
*/

0 commit comments

Comments
 (0)