PHP code example of kleegroup / franceconnect-bundle

1. Go to this page and download the library: Download kleegroup/franceconnect-bundle 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/ */

    

kleegroup / franceconnect-bundle example snippets


       /**
        * @param Request $request
        * @Route("/france-connect-traitement", name="app.fc.return")
        * @Security("is_granted('IS_AUTHENTICATED_FRANCE_CONNECT')")
        */
       public function franceConnectAction(Request $request)
       {
           $token = $this->get('security.token_storage')->getToken();
           $token->getIdentity(); // json array provided by FranceConnect 
           [...]
       }