PHP code example of groupepsih / oauth2-prosanteconnect

1. Go to this page and download the library: Download groupepsih/oauth2-prosanteconnect 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/ */

    

groupepsih / oauth2-prosanteconnect example snippets


namespace App\OAuth2\Client\Provider;

use KnpU\OAuth2ClientBundle\Client\OAuth2Client;
use League\OAuth2\Client\Token\AccessToken;
use GroupePSIH\OAuth2\Client\Provider\ProSanteConnectResourceOwner;

class ProSanteConnectClient extends OAuth2Client
{
    public function fetchUserFromToken(AccessToken $accessToken): ProSanteConnectResourceOwner|\League\OAuth2\Client\Provider\ResourceOwnerInterface
    {
        return parent::fetchUserFromToken($accessToken);
    }

    public function fetchUser(): ProSanteConnectResourceOwner|\League\OAuth2\Client\Provider\ResourceOwnerInterface
    {
        return parent::fetchUser();
    }
}