@@ -16,33 +16,21 @@ namespace Microsoft.Identity.Test.LabInfrastructure
16
16
{
17
17
internal static class LabAuthenticationHelper
18
18
{
19
- public static async Task < AccessToken > GetAccessTokenForLabAPIAsync ( string labAccessClientId )
19
+ public static async Task < AccessToken > GetAccessTokenForLabAPIAsync ( )
20
20
{
21
21
string [ ] scopes = [ LabApiConstants . LabScope ] ;
22
22
23
23
return await GetLabAccessTokenAsync (
24
24
LabApiConstants . LabClientInstance + LabApiConstants . LabClientTenantId ,
25
- scopes ,
26
- labAccessClientId ) . ConfigureAwait ( false ) ;
25
+ scopes ) . ConfigureAwait ( false ) ;
27
26
}
28
27
29
28
public static async Task < AccessToken > GetLabAccessTokenAsync ( string authority , string [ ] scopes )
30
- {
31
- return await GetLabAccessTokenAsync (
32
- authority ,
33
- scopes ,
34
- String . Empty ) . ConfigureAwait ( false ) ;
35
- }
36
-
37
- public static async Task < AccessToken > GetLabAccessTokenAsync ( string authority , string [ ] scopes , string clientId )
38
29
{
39
30
AuthenticationResult authResult ;
40
31
IConfidentialClientApplication confidentialApp ;
41
32
X509Certificate2 cert ;
42
33
43
- var clientIdForCertAuth = String . IsNullOrEmpty ( clientId ) ?
44
- LabApiConstants . LabClientId : clientId ;
45
-
46
34
cert = CertificateHelper . FindCertificateByName ( TestConstants . AutomationTestCertName ) ;
47
35
if ( cert == null )
48
36
{
@@ -51,7 +39,7 @@ public static async Task<AccessToken> GetLabAccessTokenAsync(string authority, s
51
39
}
52
40
53
41
confidentialApp = ConfidentialClientApplicationBuilder
54
- . Create ( clientIdForCertAuth )
42
+ . Create ( LabApiConstants . LabClientId )
55
43
. WithAuthority ( new Uri ( authority ) , true )
56
44
. WithCacheOptions ( CacheOptions . EnableSharedCacheOptions )
57
45
. WithCertificate ( cert , true )
0 commit comments