1. Go to this page and download the library: Download futureed/oauth2 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/ */
namespace App\Http\Controllers;
use FutureED;
use Illuminate\Http\Request;
class AuthController extends Controller
{
/**
* Redirecciona al usuario a la pagina de autenticación de FutureED.
*
* @return Response
*/
public function redirectToFutureED()
{
return FutureED::driver('FutureED')->redirect();
}
/**
* Obtiene la informacion del usuario de FutureED.
*
* @return Response
*/
public function callback(Request $request)
{
$user = FutureED::driver('FutureED')->user($request);
// $user->token;
}
}
'providers' => [
// Proveedores de servicios instalados
FutureED\OAuth2\FutureEDServiceProvider::class,
],
config/services.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.