Skip to content

Commit 1062bcb

Browse files
authored
Fix Invalid Auxiliary Token issue (#444)
Change to semicolon to comma. Fix the failed test case
1 parent 42c8d64 commit 1062bcb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ResourceManager.Test/AzureRMCmdletAuthenticationUnitTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void TestGetAuxHeaderByTenantIds()
105105
var h = header.First();
106106
Assert.Equal("x-ms-authorization-auxiliary", h.Key);
107107
Assert.Single(h.Value);
108-
var tokens = h.Value.First().Split(';');
108+
var tokens = h.Value.First().Split(AzureRMCmdlet.AUX_TOKEN_APPEND_CHAR);
109109
var regex = new Regex(@"Bearer ([0-9a-zA-Z]+)");
110110
for (int i = 0; i < tenants.Count; ++i)
111111
{

src/ResourceManager/Version2016_09_01/AzureRMCmdlet.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public abstract class AzureRMCmdlet : AzurePSCmdlet, IDynamicParameters
4949
public const int MAX_NUMBER_OF_TOKENS_ALLOWED_IN_AUX_HEADER = 3;
5050
public const string AUX_HEADER_NAME = "x-ms-authorization-auxiliary";
5151
public const string AUX_TOKEN_PREFIX = "Bearer";
52-
public const string AUX_TOKEN_APPEND_CHAR = ";";
52+
public const string AUX_TOKEN_APPEND_CHAR = ",";
5353
public const string WriteDebugKey = "WriteDebug";
5454
public const string WriteVerboseKey = "WriteVerbose";
5555
public const string WriteWarningKey = "WriteWarning";

0 commit comments

Comments
 (0)