Support LNURL Auth

This commit is contained in:
Kukks
2021-11-11 13:03:08 +01:00
committed by Andrew Camilleri
parent 1fb582c35d
commit 7243aec213
31 changed files with 697 additions and 46 deletions

View File

@@ -180,5 +180,19 @@ namespace BTCPayServer.Controllers
model.SharedKey = FormatKey(unformattedKey);
model.AuthenticatorUri = GenerateQrCodeUri(user.Email, unformattedKey);
}
[HttpPost]
public IActionResult CreateCredential(string name, Fido2Credential.CredentialType type)
{
switch (type)
{
case Fido2Credential.CredentialType.FIDO2:
return RedirectToAction("Create", "UIFido2", new { name });
case Fido2Credential.CredentialType.LNURLAuth:
return RedirectToAction("Create", "LNURLAuth", new { name });
default:
throw new ArgumentOutOfRangeException(nameof(type), type, null);
}
}
}
}