mirror of
https://github.com/bitwarden/server
synced 2025-12-28 22:23:30 +00:00
**feat**: create `SendGrantValidator` and initial `SendPasswordValidator` for Send access grants **feat**: add feature flag to toggle Send grant validation logic **feat**: add Send client to Identity and update `ApiClient` to generic `Client` **feat**: register Send services in DI pipeline **feat**: add claims management support to `ProfileService` **feat**: distinguish between invalid grant and invalid request in `SendAccessGrantValidator` **fix**: update parsing of `send_id` from request **fix**: add early return when feature flag is disabled **fix**: rename and organize Send access scope and grant type **fix**: dotnet format **test**: add unit and integration tests for `SendGrantValidator` **test**: update OpenID configuration and API resource claims **doc**: move documentation to interfaces and update inline comments **chore**: add TODO for future support of `CustomGrantTypes`
27 lines
975 B
C#
27 lines
975 B
C#
using System.Collections.Frozen;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Settings;
|
|
using Bit.Identity.IdentityServer.StaticClients;
|
|
using Duende.IdentityServer.Models;
|
|
|
|
namespace Bit.Identity.IdentityServer;
|
|
|
|
public class StaticClientStore
|
|
{
|
|
public StaticClientStore(GlobalSettings globalSettings)
|
|
{
|
|
Clients = new List<Client>
|
|
{
|
|
new ApiClient(globalSettings, BitwardenClient.Mobile, 60, 1),
|
|
new ApiClient(globalSettings, BitwardenClient.Web, 7, 1),
|
|
new ApiClient(globalSettings, BitwardenClient.Browser, 30, 1),
|
|
new ApiClient(globalSettings, BitwardenClient.Desktop, 30, 1),
|
|
new ApiClient(globalSettings, BitwardenClient.Cli, 30, 1),
|
|
new ApiClient(globalSettings, BitwardenClient.DirectoryConnector, 30, 24),
|
|
SendClientBuilder.Build(globalSettings),
|
|
}.ToFrozenDictionary(c => c.ClientId);
|
|
}
|
|
|
|
public FrozenDictionary<string, Client> Clients { get; }
|
|
}
|