Skip to content

Commit e957c6d

Browse files
author
Tiago Brenck
committed
Merge branch 'master' into tibre/multiTenantSample
2 parents ee35dbb + 6f3692c commit e957c6d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Microsoft.Identity.Web/WebApiServiceCollectionExtensions.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,17 @@ public static IServiceCollection AddProtectedWebApi(
102102
/// </summary>
103103
/// <param name="services">Service collection to which to add authentication</param>
104104
/// <param name="configuration">Configuration</param>
105-
/// <param name="scopes">Optional parameters. If not specified, the token used to call the protected API
106-
/// will be kept with the user's claims until the API calls a downstream API. Otherwise the account for the
107-
/// user is immediately added to the token cache</param>
108105
/// <returns></returns>
109106
public static IServiceCollection AddProtectedApiCallsWebApis(
110107
this IServiceCollection services,
111108
IConfiguration configuration,
112-
IEnumerable<string> scopes = null,
113109
string configSectionName = "AzureAd")
114110
{
115111
services.AddTokenAcquisition();
116112
services.AddHttpContextAccessor();
117113
services.Configure<ConfidentialClientApplicationOptions>(options => configuration.Bind(configSectionName, options));
118114
services.Configure<JwtBearerOptions>(AzureADDefaults.JwtBearerAuthenticationScheme, options =>
119115
{
120-
// If you don't pre-provide scopes when adding calling AddProtectedApiCallsWebApis, the On behalf of
121-
// flow will be delayed (lazy construction of MSAL's application
122116
options.Events.OnTokenValidated = async context =>
123117
{
124118
context.HttpContext.StoreTokenUsedToCallWebAPI(context.SecurityToken as JwtSecurityToken);

0 commit comments

Comments
 (0)