Question

I'm doing some research in OWIN self-hosting for the company i work for. But the authentication part i can't get it to work and all the examples i can find are either unclear or written for ASP.NET while i am only allowed to use C#. What i want to do is have a list, xml file or database which one doesn't matter now, but i want to use one of the sources to create my own custom authentication for OWIN self-hosting without ASP.NET and MVC. The connection will be HTTPS and the client is HTML/JavaScript based. I was hoping someone can point me in the right direction or provide me with an example.

Was it helpful?

Solution

Just use the ASP.NET Identity framework and write your own provider. You will get all the great benefits like encryption for free. Without any effort. To lose all this good stuff just because somebody doesn't know ASP.NET is just not reasonable (imho). It has very little to do with ASP.NET because it is so loosely-coupled.

http://www.asp.net/identity gives you an idea of how to sit on top of OWIN.

Custom provider examples

http://www.asp.net/identity/overview/extensibility/overview-of-custom-storage-providers-for-aspnet-identity

http://www.asp.net/identity/overview/extensibility/implementing-a-custom-mysql-aspnet-identity-storage-provider

And here is mine for Oracle databases, very simple to understand I would say. It should give you an idea on how to implement your own one:

https://github.com/timmkrause/AspNet.Identity.OracleProvider

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top