Last post Apr 18, 2016 11:38 AM by Yohann Lu
Apr 15, 2016 09:21 AM|vs2010junkie|LINK
I have a custom class derived from ClaimsIdentity as follows:
public class AuthenticatedUser : ClaimsIdentity, IAuthenticatedUser
public AuthenticatedUser(IIdentity identity): base(identity)
this.Identity = identity;
However, the problem that I am encountering is that I am using Ninject as my IoC container and when I attempt to load my class, I have no idea how to inject IIdentity using Ninject to accomplish this!
Normally in Ninject, I inject an interface and cast it to a concrete instance of a class, but how do I do this when there is no concrete instance I am using since IIdentity IS the base interface/class defined in the .NET Framework?
Apr 18, 2016 11:38 AM|Yohann Lu|LINK
I found some links in the below. I hope it is help for you.
1: Ninject with asp.net Web Forms:
2: Inject Identity classes with Ninject: