1
0
mirror of https://github.com/bitwarden/server synced 2025-12-16 08:13:33 +00:00

Added static client store (#899)

This commit is contained in:
Kyle Spearrin
2020-08-28 13:32:15 -04:00
committed by GitHub
parent db7d05b52f
commit 38728143d8
6 changed files with 148 additions and 123 deletions

View File

@@ -0,0 +1,24 @@
using IdentityServer4.Models;
using System.Collections.Generic;
using System.Linq;
namespace Bit.Core.IdentityServer
{
public class StaticClientStore
{
public StaticClientStore(GlobalSettings globalSettings)
{
ApiClients = new List<Client>
{
new ApiClient(globalSettings, "mobile", 90, 1),
new ApiClient(globalSettings, "web", 30, 1),
new ApiClient(globalSettings, "browser", 30, 1),
new ApiClient(globalSettings, "desktop", 30, 1),
new ApiClient(globalSettings, "cli", 30, 1),
new ApiClient(globalSettings, "connector", 30, 24)
}.ToDictionary(c => c.ClientId);
}
public IDictionary<string, Client> ApiClients { get; private set; }
}
}