File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -102,23 +102,17 @@ public static IServiceCollection AddProtectedWebApi(
102
102
/// </summary>
103
103
/// <param name="services">Service collection to which to add authentication</param>
104
104
/// <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>
108
105
/// <returns></returns>
109
106
public static IServiceCollection AddProtectedApiCallsWebApis (
110
107
this IServiceCollection services ,
111
108
IConfiguration configuration ,
112
- IEnumerable < string > scopes = null ,
113
109
string configSectionName = "AzureAd" )
114
110
{
115
111
services . AddTokenAcquisition ( ) ;
116
112
services . AddHttpContextAccessor ( ) ;
117
113
services . Configure < ConfidentialClientApplicationOptions > ( options => configuration . Bind ( configSectionName , options ) ) ;
118
114
services . Configure < JwtBearerOptions > ( AzureADDefaults . JwtBearerAuthenticationScheme , options =>
119
115
{
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
122
116
options . Events . OnTokenValidated = async context =>
123
117
{
124
118
context . HttpContext . StoreTokenUsedToCallWebAPI ( context . SecurityToken as JwtSecurityToken ) ;
You can’t perform that action at this time.
0 commit comments