Skip to content

Commit

Permalink
Lozensky/fix perf issue CallDownstreamApi (#2350)
Browse files Browse the repository at this point in the history
* removed dupe line

* update change

* remove unneeded argument
  • Loading branch information
JoshLozensky authored Jul 30, 2023
1 parent ba21960 commit cef9046
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@ public static MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration AddM
{
_ = Throws.IfNull(configurationSection);
_ = Throws.IfNull(builder);

AddMicrosoftIdentityWebApiImplementation(
builder,
options => configurationSection.Bind(options),
options => configurationSection.Bind(options),
jwtBearerScheme,
subscribeToJwtBearerMiddlewareDiagnosticsEvents);

Expand Down Expand Up @@ -122,7 +121,6 @@ public static MicrosoftIdentityWebApiAuthenticationBuilder AddMicrosoftIdentityW
AddMicrosoftIdentityWebApiImplementation(
builder,
configureJwtBearerOptions,
configureMicrosoftIdentityOptions,
jwtBearerScheme,
subscribeToJwtBearerMiddlewareDiagnosticsEvents);

Expand All @@ -137,12 +135,10 @@ public static MicrosoftIdentityWebApiAuthenticationBuilder AddMicrosoftIdentityW
private static void AddMicrosoftIdentityWebApiImplementation(
AuthenticationBuilder builder,
Action<JwtBearerOptions> configureJwtBearerOptions,
Action<MicrosoftIdentityOptions> configureMicrosoftIdentityOptions,
string jwtBearerScheme,
bool subscribeToJwtBearerMiddlewareDiagnosticsEvents)
{
builder.AddJwtBearer(jwtBearerScheme, configureJwtBearerOptions);
builder.Services.Configure(jwtBearerScheme, configureMicrosoftIdentityOptions);
builder.Services.AddSingleton<IMergedOptionsStore, MergedOptionsStore>();

builder.Services.AddHttpContextAccessor();
Expand Down

0 comments on commit cef9046

Please sign in to comment.