Vladimir Djurdjevic
Vladimir Djurdjevic

Reputation: 196

ASP.NET 5 RC1 Identity Authentication method

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.

Upvotes: 2

Views: 297

Answers (2)

labroo
labroo

Reputation: 2961

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

Upvotes: 0

Kévin Chalet
Kévin Chalet

Reputation: 42030

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

Upvotes: 2

Related Questions