File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests
1515{
1616 public class SqlClientCustomTokenCredential : TokenCredential
1717 {
18+ private const string DEFAULT_PREFIX = "/.default" ;
1819 private static readonly ConcurrentDictionary < string , ClientSecretCredential > s_clientSecretCredentials = new ( ) ;
1920
2021 string _authority = "" ;
@@ -61,6 +62,7 @@ private async Task<AccessToken> AcquireTokenAsync()
6162 {
6263 _resource = value ;
6364 }
65+ }
6466 }
6567 }
6668 }
@@ -98,7 +100,7 @@ public static async Task<AccessToken> AzureActiveDirectoryAuthenticationCallback
98100 {
99101 using CancellationTokenSource cts = new ( ) ;
100102 cts . CancelAfter ( 30000 ) ; // Hard coded for tests
101- string [ ] scopes = new string [ ] { resource + "/.default" } ;
103+ string [ ] scopes = new string [ ] { resource + DEFAULT_PREFIX } ;
102104 TokenRequestContext tokenRequestContext = new ( scopes ) ;
103105 int seperatorIndex = authority . LastIndexOf ( '/' ) ;
104106 string authorityHost = authority . Remove ( seperatorIndex + 1 ) ;
You can’t perform that action at this time.
0 commit comments