Split the greenfield authhandler in two classes

This commit is contained in:
nicolas.dorier
2020-03-27 13:06:41 +09:00
parent afdee9d8a2
commit d219ba5d32
4 changed files with 74 additions and 41 deletions

View File

@@ -26,7 +26,9 @@ namespace BTCPayServer.Security.GreenField
public static AuthenticationBuilder AddAPIKeyAuthentication(this AuthenticationBuilder builder)
{
builder.AddScheme<GreenFieldAuthenticationOptions, GreenFieldAuthenticationHandler>(AuthenticationSchemes.Greenfield,
builder.AddScheme<GreenFieldAuthenticationOptions, APIKeysAuthenticationHandler>(AuthenticationSchemes.GreenfieldAPIKeys,
o => { });
builder.AddScheme<GreenFieldAuthenticationOptions, BasicAuthenticationHandler>(AuthenticationSchemes.GreenfieldBasic,
o => { });
return builder;
}