PHP code example of srako / laravel-casdoor

1. Go to this page and download the library: Download srako/laravel-casdoor 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/ */

    

srako / laravel-casdoor example snippets


'casdoor' => [    
  'client_id' => env('CASDOOR_CLIENT_ID'),  
  'client_secret' => env('CASDOOR_CLIENT_SECRET'),  
  'redirect' => env('CASDOOR_REDIRECT_URI'),
  'url' => env('CASDOOR_URL'),
  'jwt_key' => env('CASDOOR_JWT_KEY', config_path('test.pem')),
],

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\Casdoor\CasdoorExtendSocialite::class.'@handle',
    ],
];

return Socialite::driver('casdoor')->redirect();