Skip to content

Commit 99b7c40

Browse files
authored
feat: Env var to disable token auth (#206)
1 parent d643a02 commit 99b7c40

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Examples/BookingSystem.AspNetCore/Startup.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ public Startup(IConfiguration configuration)
1818
{
1919
AppSettings = new AppSettings();
2020
configuration.Bind(AppSettings);
21+
22+
// Provide a simple way to disable token auth for some testing scenarios
23+
if (System.Environment.GetEnvironmentVariable("DISABLE_TOKEN_AUTH") == "true") {
24+
AppSettings.FeatureFlags.EnableTokenAuth = false;
25+
}
2126
}
2227

2328
public AppSettings AppSettings { get; }

0 commit comments

Comments
 (0)