add temp ban on failed auth

This commit is contained in:
Stanley Dimant
2022-08-06 19:26:35 +02:00
parent 52c3491168
commit 1e73ab55c5
3 changed files with 71 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ namespace MareSynchronosServer
{
options.DefaultScheme = SecretKeyAuthenticationHandler.AuthScheme;
})
.AddScheme<AuthenticationSchemeOptions, SecretKeyAuthenticationHandler>(SecretKeyAuthenticationHandler.AuthScheme, options => { });
.AddScheme<AuthenticationSchemeOptions, SecretKeyAuthenticationHandler>(SecretKeyAuthenticationHandler.AuthScheme, options => {});
services.AddAuthorization(options => options.FallbackPolicy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build());
services.AddSingleton<IRateLimitConfiguration, RateLimitConfiguration>();