2

I can't find anywhere answer on question what is default authentication in ASP.NET 5 RC1, is it token based or cookie based. All i know is if i say app.UseIdentity() in my Startup.cs and i put [Authorize] attribute on my controllers, it is gonna work, but i can't figure out which method it uses. There are so many tutorials for token based authentication for ASP.NET 4.6 but things are different, i can't figure out how to apply that stuff in new ASP.NET 5.

2 Answers2

2

ASP.NET Identity 3 exclusively relies on cookie authentication (app.UseIdentity() is basically just a wrapper around app.UseCookieAuthentication()).

There are already a few SO posts covering token authentication. Here's one: https://stackoverflow.com/a/35310717/542757

Community
  • 1
  • 1
Kévin Chalet
  • 39,509
  • 7
  • 121
  • 131
0

Its cookie authentication. You can check it out here https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNetCore.Identity/BuilderExtensions.cs

labroo
  • 2,901
  • 3
  • 27
  • 36