add basic auth for greenfield

This commit is contained in:
Kukks
2020-03-20 14:05:23 +01:00
parent 478b1463ff
commit 9d99c32305
10 changed files with 129 additions and 35 deletions

View File

@@ -0,0 +1,17 @@
using BTCPayServer.Security.Basic;
using Microsoft.AspNetCore.Authentication;
namespace BTCPayServer.Security.APIKeys
{
public static class BasicExtensions
{
public static AuthenticationBuilder AddBasicAuthentication(this AuthenticationBuilder builder)
{
builder.AddScheme<BasicAuthenticationOptions, BasicAuthenticationHandler>(AuthenticationSchemes.Basic,
o => { });
return builder;
}
}
}