Objective
Yesterday and a better technology to chat with the elder, found that sometimes their own way of learning some problems, do not know and I have the same learning the more I feel the lack of knowledge but can recognize the problem of the students, also do not be too impatient road is a step by step of the meal is a mouthful to eat the realization of the error can be higher error, Down-to-earth as long as there is retwist learning heart, will eventually achieve something. Recognize their weak places to learn, to understand the purpose of learning well conditioning clear: what is this? Why are you doing this? What problems can be solved? Let's get down to the chase.
What is authentication
Many websites have login dialogs that allow pre-registered users to authenticate to provide them with personalized services. You can think of this process as two things happening: Authentication and authorization! The purpose of logging on is to verify that the user requesting the login is legitimate, while the authorization is to verify that legitimate users are accessing or rejecting according to their permissions when requesting resources.
For example: We have logged in on a Web site, you just turned off the Web page, and then you opened the browser and then entered the URL, this time you found that you have to log in to do the operation. Frequent this is the loss of the user a great experience, so this time to use the authentication.
What is authentication? Authentication and authorization. Why should I use it? Enhance the user experience effect. What problems can be solved? Save user time to avoid repetitive actions.
Form Identity Verification Ideas
To browse for a page that requires permission, the security mechanism starts and checks whether the current user requests a cookie that holds the user's ticket so the cookie exists: parses the ticket information in the cookie, obtains the user role, creates a user ID or object. Otherwise: think the user is not authorized to browse the page, jump to the login page, log in successfully redirected to the requested page.
C # MVC based on the authentication from