1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-12 15:26:48 +01:00
bitwarden-server/util/Setup/AppIdBuilder.cs

40 lines
806 B
C#
Raw Normal View History

2017-10-24 04:45:59 +02:00
using System;
using System.IO;
namespace Bit.Setup
{
public class AppIdBuilder
{
public AppIdBuilder(string url)
{
Url = url;
}
public string Url { get; private set; }
public void Build()
{
Console.WriteLine("Building FIDO U2F app id.");
Directory.CreateDirectory("/bitwarden/web/");
using(var sw = File.CreateText("/bitwarden/web/app-id.json"))
{
sw.Write($@"{{
""trustedFacets"": [
{{
""version"": {{
""major"": 1,
""minor"": 0
}},
""ids"": [
""{Url}"",
""ios:bundle-id:com.8bit.bitwarden"",
""android:apk-key-hash:dUGFzUzf3lmHSLBDBIv+WaFyZMI""
]
}}
]
}}");
}
}
}
}