PHP API and Login permissions validation

Source: Internet
Author: User

Classes, libraries, interfaces (APIs), functions, these concepts are defined according to the size of the problem size. A small problem is definitely not necessary to write a library, just a few words.

But for example, a login verification, this feature is very powerful, very general, may need to use the front office,

Then write a mall, login controller, Shopping Hall controller, shopping cart controller, usually after the shopping cart controller view products, directly back to the shopping Hall controller display product list, this time do not need to go to the login controller

This is the shopping hall controller and the shopping Cart controller work together, but in fact, the general situation of all controllers need to inherit a basecontroller, and then in the Basecontroller to verify that there is no session, so

You can verify that the user has no login, so that security is guaranteed, for login This controller need not inherit this basecontroller, so I passed the analysis that it is necessary to inherit better, because this can verify the session

When the user enters the login path in the address bar, the user is required to reenter the user name password, or the user needs to enter it again.

PHP API and Login permissions validation

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.