Monday, 5 December 2016

ASP.NET MVC Authentication


Forms Attributes:

name="[cookie name]" - Sets the name of the cookie used for Forms Authentication.

loginUrl="[url]" - Sets the URL to redirect client to for authentication.

protection="[All|None|Encryption|Validation]" - Sets the protection mode for data in cookie.

timeout="[minutes]" - Sets the duration of time for cookie to be valid (reset on each request).

path="/" - Sets the path for the cookie.

requireSSL="[true|false]" - Should the forms authentication cookie be sent only over SSL?

slidingExpiration="[true|false]" - Should the forms authentication cookie and ticket be reissued if they are about to expire?

Autehntication Sample:
http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1



Features
Asp.Net Forms Authentication
OWIN Forms Authentication
Cookie Authentication
Yes
Yes
Cookieless Authentication
Yes
No
Expiration
Yes
Yes
Sliding Expiration
Yes
Yes
Token Protection
Yes
Yes
Claims Support
No
Yes
Web Farm Support
Yes
Yes
Unauthorized Redirection
Yes
Yes