PHP code example of mediawiki / guzzle-json-auth

1. Go to this page and download the library: Download mediawiki/guzzle-json-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/ */

    

mediawiki / guzzle-json-auth example snippets

` php
# Setup GuzzleJsonAuth
$wgGuzzleJsonAuthUrl = 'http://yourapplication.com/your_json_endpoint';

$wgGuzzleJsonRequestBaseKey = 'User';
$wgGuzzleJsonRequestUsernameKey = 'username';
$wgGuzzleJsonRequestPasswordKey = 'password';

$wgGuzzleJsonResponseBaseKey = 'user';
$wgGuzzleJsonResponseUsernameKey = 'username';
$wgGuzzleJsonResponseRealNameKey = 'real_name';
$wgGuzzleJsonResponseEmailKey = 'email';

// Load and initialize the GuzzleJsonAuth extension