File tree Expand file tree Collapse file tree 5 files changed +8
-11
lines changed
Expand file tree Collapse file tree 5 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -171,10 +171,9 @@ public override async Task SignOutAsync()
171171 }
172172
173173 /// <inheritdoc/>
174- public override Task < string > GetTokenAsync ( bool silentOnly = false , string [ ] scopes = null )
174+ public override Task < string > GetTokenAsync ( bool silentOnly = false )
175175 {
176- var withScopes = scopes ?? this . Scopes ;
177- return this . GetTokenWithScopesAsync ( withScopes , silentOnly ) ;
176+ return this . GetTokenWithScopesAsync ( Scopes , silentOnly ) ;
178177 }
179178
180179 /// <summary>
Original file line number Diff line number Diff line change @@ -184,17 +184,16 @@ public override async Task SignOutAsync()
184184 }
185185
186186 /// <inheritdoc />
187- public override async Task < string > GetTokenAsync ( bool silentOnly = false , string [ ] scopes = null )
187+ public override async Task < string > GetTokenAsync ( bool silentOnly = false )
188188 {
189189 await SemaphoreSlim . WaitAsync ( ) ;
190190
191191 try
192192 {
193- // use request specific scopes if not null, otherwise use class scopes
194- var authenticationScopes = scopes ?? this . _scopes ;
193+ var scopes = _scopes ;
195194
196195 // Attempt to authenticate silently.
197- var authResult = await AuthenticateSilentAsync ( authenticationScopes ) ;
196+ var authResult = await AuthenticateSilentAsync ( scopes ) ;
198197
199198 // Authenticate with user interaction as appropriate.
200199 if ( authResult ? . ResponseStatus != WebTokenRequestStatus . Success )
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public BaseProvider()
5252 public abstract Task AuthenticateRequestAsync ( HttpRequestMessage request ) ;
5353
5454 /// <inheritdoc />
55- public abstract Task < string > GetTokenAsync ( bool silentOnly = false , string [ ] scopes = null ) ;
55+ public abstract Task < string > GetTokenAsync ( bool silentOnly = false ) ;
5656
5757 /// <inheritdoc />
5858 public abstract Task SignInAsync ( ) ;
Original file line number Diff line number Diff line change @@ -39,9 +39,8 @@ public interface IProvider
3939 /// Retrieve a token for the authenticated user.
4040 /// </summary>
4141 /// <param name="silentOnly">Determines if the acquisition should be done without prompts to the user.</param>
42- /// <param name="scopes"> Optional parameter for setting scopes specific to this token request. </param>
4342 /// <returns>A token string for the authenticated user.</returns>
44- Task < string > GetTokenAsync ( bool silentOnly = false , string [ ] scopes = null ) ;
43+ Task < string > GetTokenAsync ( bool silentOnly = false ) ;
4544
4645 /// <summary>
4746 /// Sign in the user.
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public override async Task AuthenticateRequestAsync(HttpRequestMessage request)
5252 }
5353
5454 /// <inheritdoc/>
55- public override Task < string > GetTokenAsync ( bool silentOnly = false , string [ ] scopes = null )
55+ public override Task < string > GetTokenAsync ( bool silentOnly = false )
5656 {
5757 return Task . FromResult ( "<mock-provider-token>" ) ;
5858 }
You can’t perform that action at this time.
0 commit comments