I apologize if I use some wrong or ambiguous terms. Please correct me if I do.
I have a fairly new ASP.NET 4.6 MVC 5 app that uses Claims authentication via WsFederation and Microsoft ADFS server. That means that I do not expose a LogIn action controller nor do I manage users and passwords in my webapp. When the user navigates to my site, if they are not authenticated they are redirected to the ADFS server where they log in and then are redirected back.
I have a need to store some of the submitted claims for offline usage -- their display name and email address. My thought was to utilize the ASP.NET Identity package that creates that collection os AspNet*
tables. It was my understanding that it is designed to support both local users (with passwords) and external users (with passwords managed externally) from providers like Facebook, Google, Github, etc. Am I correct that ADFS falls under that category?
And after a successful authentication redirects back to my site, where exactly do I put the logic that checks if the user has entry in the AspNet*
tables? The configuration and wiring up of the cookie authentication and WsFederation currently happens in the Startup.ConfigureAuth(IAppBuilder app)
method. I think I am supposed to use classes that inherit from IdentityUser
and IdentityDbContext<ApplicationUser>
and then call methods on UserManager
or UserStore
.
I have spent hours searching for examples of how to associate the external logins with the application "profile" tables to no avail. It is very possible that I have just been using the wrong terms. Every example I have found so far deals with either emulating or modifying the default VS template that comes with Login and Register action methods or just hooking up FB and Google. Nothing that deals with ADFS and/or tying into the profile tables from external sources.
Any code examples or at the very least links to articles/resources would be greatly appreciated.