Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Default longer refresh interval for jwtBearerOptions" #65

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ public static AuthenticationBuilder AddClientCredentials(this AuthenticationBuil
}

configSection.Bind(options);

// The default interval is 5 minutes which caused a lot of traffic to the authority server.
// Users still have the possibility to overwrite this value in their services.
options.RefreshInterval = TimeSpan.FromHours(12);
});

builder.AddJwtBearer(authScheme, configureOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public void GivenAnAuthenticationBuilder_WhenConfigsArePresent_ThenOptionsAreSet

Assert.Equal("audience", jwtBearerOptions.Audience);
Assert.Equal("https://identity.local", jwtBearerOptions.Authority);
Assert.Equal(TimeSpan.FromHours(12), jwtBearerOptions.RefreshInterval);
}

[Fact]
Expand All @@ -43,7 +42,6 @@ public void GivenAnAuthenticationBuilder_WhenActionConfigsIsPresent_ThenOptionsA
{
option.Authority = "https://identity.local";
option.Audience = "audience";
option.RefreshInterval = TimeSpan.FromMinutes(45);
});

var sp = services.BuildServiceProvider();
Expand All @@ -52,7 +50,6 @@ public void GivenAnAuthenticationBuilder_WhenActionConfigsIsPresent_ThenOptionsA

Assert.Equal("audience", jwtBearerOptions.Audience);
Assert.Equal("https://identity.local", jwtBearerOptions.Authority);
Assert.Equal(TimeSpan.FromMinutes(45), jwtBearerOptions.RefreshInterval);
}

[Fact]
Expand Down
Loading