We want to work with Microsoft.AspNet.Identity in order to provide Custom Claims based authentication. So far we have created our own Models (IUserStype, IUserStore ...) and our own authentication methods. So actually a User can call a login service and use the UserStore and all the functionality provided by this component.
I got stuck in how to configure an ASP.NET MVC application to use ASP.NET Identity because the only samples available on MSDN shows OWIN configuration but my app cannot be self-hosted by owin. So should I configure this claims authentication using web.config? Any sample available online?
Microsoft.AspNet.Identity.OWIN. This package contains functionality that is used to plug in OWIN authentication with ASP.NET Identity in ASP.NET applications. This is used when you add sign in functionality to your application and call into OWIN Cookie Authentication middleware to generate a cookie.
To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.
ASP.NET Identity is Microsoft's user management library for ASP.NET. It includes functionality such as password hashing, password validation, user storage, and claims management. It usually also comes with some basic authentication, bringing its own cookies and multi-factor authentication to the party.
From ASP.NET Site ,,,
"ASP.NET authentication is now based on OWIN middleware that can be used on any OWIN-based host. ASP.NET Identity does not have any dependency on System.Web. It is a fully compliant OWIN framework and can be used in any OWIN hosted application. ASP.NET Identity uses OWIN Authentication for log-in/log-out of users in the web site. This means that instead of using FormsAuthentication to generate the cookie, the application uses OWIN CookieAuthentication to do that."
So you cannot use ASP.NET Identity without Owin, also, your app should not be self-hosted you can still use the IIS with OWIN configured, i suggest to dig deeper into the ASP.NET OWIN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With