Skip to content

Commit d6d12e0

Browse files
committed
feat: register defaultazurecredential in ConfigureDanPluginDefaults
1 parent 1177273 commit d6d12e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dan.Common/Extensions/HostBuilderExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Reflection;
22
using Azure.Core.Serialization;
3+
using Azure.Identity;
34
using Dan.Common.Handlers;
45
using Dan.Common.Interfaces;
56
using Dan.Common.Services;
@@ -117,6 +118,10 @@ public static IHostBuilder ConfigureDanPluginDefaults(this IHostBuilder builder)
117118
services.AddTransient<IDanPluginClientService, DanPluginClientService>();
118119
services.AddTransient<ICcrClientService, CcrClientService>();
119120

121+
// This can be overwritten by plugins by doing their own registrations if needing special options
122+
var defaultCredentials = new DefaultAzureCredential();
123+
services.AddSingleton(defaultCredentials);
124+
120125
// Try to add the first IEvidenceSourceMetadata implementation we can find in the entry assembly
121126
var evidenceSourceMetadataServiceType = typeof(IEvidenceSourceMetadata);
122127
var assembly = Assembly.GetEntryAssembly();

0 commit comments

Comments
 (0)