. Net Core cookie-based Certification and licensing

Source: Internet
Author: User

One of the authentication and authorization patterns for. NET core is cookie-based, first we create a. NET Core MVC project:

Then increase the access control of the page, Conytroller add authorize property to the page to be accessed, and we add the support configuration of the cookie permission authentication in Start.cs, and then go to the page that needs to verify the permission to jump to the landing page:

Next we can increase the authorization code for the cookie:

We found that each authorization verification jump to the page is the Account/login page, this jump path is not customizable, the answer is of course. Here are the steps to proceed.

Well, an unidentified so the Cookie-base authentication and authorization feature is implemented, because. NET core is now open source, why we add the above to achieve a cookie-base certification and authorization, interested in viewing the source to explore

(Refer to the. NET Core video tutorial of the Ascendas Teacher (Jesse) for the above operation)

. Net Core cookie-based Certification and licensing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.