PHP code example of webuilder240 / cake-simple-http-auth

1. Go to this page and download the library: Download webuilder240/cake-simple-http-auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webuilder240 / cake-simple-http-auth example snippets

 php 



    CakePlugin::load('SimpleHttpAuth');
    
    Configure::write('SimpleHttpAuth.Config',[
        'stg' => [
            'user' => 'test',
            'password' => 'test',
        ],
    ]);
 php



	App::uses('Controller','Controller');

	class AppController extends Controller 
	{
		public $components = [
			'SimpleHttpAuth.Basic',
		];