PHP code example of daemonlabs / shield-oidc

1. Go to this page and download the library: Download daemonlabs/shield-oidc 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/ */

    

daemonlabs / shield-oidc example snippets


    helper('oidc') 

namespace Config;

use DaemonLabs\ShieldOidc\Config\ShieldOidc as BaseShieldOidc;

class ShieldOidc extends BaseShieldOidc
{
    public array $providers = [];

    public function __construct()
    {
        parent::__construct();

        $this->providers['entra'] = [
            'type'         => 'entra',
            'tenant'       => env('ENTRA_TENANT'),        // your tenant id or domain
            'clientId'     => env('ENTRA_CLIENT_ID'),
            'clientSecret' => env('ENTRA_CLIENT_SECRET'),
        ];

        $this->providers['google'] = [
            'issuer'         => 'https://accounts.google.com',
            'clientId'       => env('GOOGLE_CLIENT_ID'),
            'clientSecret'   => env('GOOGLE_CLIENT_SECRET'),
            '