mirror of
https://github.com/bitwarden/server.git
synced 2024-12-24 17:17:40 +01:00
0e76371d0d
* asset links for Android FIDO2 * added release & debug fingerprints
36 lines
845 B
C#
36 lines
845 B
C#
using System.IO;
|
|
|
|
namespace Bit.Setup
|
|
{
|
|
public class AssetLinksBuilder
|
|
{
|
|
private readonly Context _context;
|
|
|
|
public AssetLinksBuilder(Context context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public void Build()
|
|
{
|
|
var model = new TemplateModel
|
|
{
|
|
Url = _context.Config.Url
|
|
};
|
|
|
|
Helpers.WriteLine(_context, "Building Asset Links For Fido2.");
|
|
Directory.CreateDirectory("/bitwarden/web/");
|
|
var template = Helpers.ReadTemplate("AssetLinks");
|
|
using (var sw = File.CreateText("/bitwarden/web/assetlinks.json"))
|
|
{
|
|
sw.Write(template(model));
|
|
}
|
|
}
|
|
|
|
public class TemplateModel
|
|
{
|
|
public string Url { get; set; }
|
|
}
|
|
}
|
|
}
|