Using WIF with .NET 4.5 in MVC4 app with Ninject
Here's the situation - I have a custom ClaimsAuthenticationManager
subclass called TenantAccessClaimsAuthenticationManager
that does some claims transformation. The TenantAccessClaimsAuthenticationManager
needs a IRepository object to be injected into it (using ninject).
The .NET 4.5 impl of WIF suggests that I can stick my custom claims authentication manager in the web.config - however, this approach can only instantiate the object via a no-args ctor.
The second approach I had is to not have anything int the web.config, but in App_start
, get a handle to the WIF configuration and stick in the TenantAccessClaimsAuthenticationManager
in RegisterServices
How do I get a handle to the currently application's WIF configuration context? MSDN docs aren't helping.
Edit: Obviously the problem is that the onServiceConfigurationCreated
event is no longer available. What's the best way to do this now