mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
40 lines
806 B
C#
40 lines
806 B
C#
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""
|
|
]
|
|
}}
|
|
]
|
|
}}");
|
|
}
|
|
}
|
|
}
|
|
}
|