About the HTTP Basic Permission authentication solution

Source: Internet
Author: User
Tags http authentication
About HTTP Basic permission authentication
Recently in the company's operating support platform, the system is Java, interface connection to do authentication, based on HTTP basic permission authentication.
To enter the user name and password, I Baidu the next, did not find this information, please ask, PHP How to do basic permission certificate Ah ...
------to solve the idea----------------------
The manual has:
Example 34-1. Basic HTTP Authentication Example
 
   if (!isset ($_server[' Php_auth_user ')) {
Header (' Www-authenticate:basic realm= ' My realm ');
Header (' http/1.0 401 Unauthorized ');
Echo ' Text to send if user hits Cancel button ';
Exit
} else {
echo "

Hello {$_server[' Php_auth_user '}.

";
echo "

You entered {$_server[' PHP_AUTH_PW '}} as your password.

";
}
?>

------to solve the idea----------------------
It is estimated that restricting access to the path you want to access on the server can fulfill your requirements
  • 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.