Announcements
I've seen IAssemblyAuthenticationContext used in plugins. I want to instantiate it in particular so I can use its AcquireToken() method. However, whenever I look in serviceProvider that is passed into the Execute() function for it, it is never available. This makes my AssemblyAuthContext variable below always null.
public void Execute(IServiceProvider serviceProvider) { var PluginExecutionContext = serviceProvider.Get(); var TracingService = new LocalTracingService(serviceProvider); // This is always null var AssemblyAuthContext = serviceProvider.Get(); // What I wwant to do string token = AssemblyAuthContext.AcquireToken("url", "authResource, AuthenticationType.ClientAssertionCertificateWithX5c); }
Anyone know how to make this available in a plugin? Do you have to pass it in somehow?
It's the same method as doing serviceProvider.Get<IAssemblyAuthenticationContext>();
I can debug the plugin and inspect what's in serviceProvider. Nothing of type "IAssemblyAuthenticationContext" is in there.
what if happens if you try
serviceProvider.GetService(typeof(IAssemblyAuthenticationContext));
André Arnaud de Cal...
294,099
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator