mirror of
https://github.com/bitwarden/server
synced 2026-02-06 19:53:21 +00:00
* Upgrade to Duende.Identity * Linting * Get rid of last IdentityServer4 package * Fix identity test since Duende returns additional configuration * Use Configure PostConfigure is ran after ASP.NET's PostConfigure so ConfigurationManager was already configured and our HttpHandler wasn't being respected. * Regenerate lockfiles * Move to 6.0.4 for patches * fixes with testing * Add additional grant type supported in 6.0.4 and beautify * Lockfile refresh * Reapply lockfiles * Apply change to new WebAuthn logic * When automated merging fails me --------- Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com> Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
using Bit.Core.Settings;
|
|
using Bit.Core.Utilities;
|
|
using Duende.IdentityServer.Configuration;
|
|
using Duende.IdentityServer.Services;
|
|
using Duende.IdentityServer.Stores;
|
|
using Duende.IdentityServer.Validation;
|
|
|
|
namespace Bit.Identity.Utilities;
|
|
|
|
public class DiscoveryResponseGenerator : Duende.IdentityServer.ResponseHandling.DiscoveryResponseGenerator
|
|
{
|
|
private readonly GlobalSettings _globalSettings;
|
|
|
|
public DiscoveryResponseGenerator(
|
|
IdentityServerOptions options,
|
|
IResourceStore resourceStore,
|
|
IKeyMaterialService keys,
|
|
ExtensionGrantValidator extensionGrants,
|
|
ISecretsListParser secretParsers,
|
|
IResourceOwnerPasswordValidator resourceOwnerValidator,
|
|
ILogger<DiscoveryResponseGenerator> logger,
|
|
GlobalSettings globalSettings)
|
|
: base(options, resourceStore, keys, extensionGrants, secretParsers, resourceOwnerValidator, logger)
|
|
{
|
|
_globalSettings = globalSettings;
|
|
}
|
|
|
|
public override async Task<Dictionary<string, object>> CreateDiscoveryDocumentAsync(
|
|
string baseUrl, string issuerUri)
|
|
{
|
|
var dict = await base.CreateDiscoveryDocumentAsync(baseUrl, issuerUri);
|
|
return CoreHelpers.AdjustIdentityServerConfig(dict, _globalSettings.BaseServiceUri.Identity,
|
|
_globalSettings.BaseServiceUri.InternalIdentity);
|
|
}
|
|
}
|