33 ILoggerFactory loggerFactory,
34 IOptions<SecurityConfiguration> securityConfigurationOptions)
36 ArgumentNullException.ThrowIfNull(loggerFactory);
38 var securityConfiguration = securityConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(securityConfigurationOptions));
40 var validatorsBuilder =
new List<IOAuthValidator>();
43 if (securityConfiguration.OAuth ==
null)
46 if (securityConfiguration.OAuth.TryGetValue(
OAuthProvider.GitHub, out var gitHubConfig))
47 validatorsBuilder.Add(
53 if (securityConfiguration.OAuth.TryGetValue(
OAuthProvider.Discord, out var discordConfig))
54 validatorsBuilder.Add(
60 if (securityConfiguration.OAuth.TryGetValue(
OAuthProvider.TGForums, out var tgConfig))
61 validatorsBuilder.Add(
67 if (securityConfiguration.OAuth.TryGetValue(
OAuthProvider.Keycloak, out var keyCloakConfig))
68 validatorsBuilder.Add(
74 if (securityConfiguration.OAuth.TryGetValue(
OAuthProvider.InvisionCommunity, out var invisionConfig))
75 validatorsBuilder.Add(