Hello,
When using the extension AddSaml(), any interaction goes through the SamlAuthenticationHandler, the ISamlServiceProvider.Events is replaced by the Handler's Events. I need to have access to the DI system for an event (OnSamlAssertionReceived). If I inherit from SamlServiceProvider and add my options in my constructor (would register my overridden SamlServiceProvider class in the DI and this have access to the DI there), the options are overridden by the Handler's option thus any options I setup in that class disappears.
Hidding the method for instance ReceiveSsoAsync() and setting up my events there works.
Would it be possible to add in the Events arguments Action the HttpContext so that we can go and have access to the IServiceProvider (or have access to the IServiceProvider altogether) ?
For example in the ISamlServiceProviderEvents interface: From: System.Action<SamlAssertion> OnSamlAssertionReceived { get; set; } To: System.Action<SamlAssertion,HttpContext> OnSamlAssertionReceived { get; set; }
This would simplify a lot the process
Thank you
|