lundi 28 août 2017

Laravel login from external system

I'm developing a module with Laravel 5 inside an external system, the external system has its own login and data in another DB, then I had to implement permissions into my Laravel module, so I had to configure a Middleware in the routes, and now i get 2 login screens, I just need to log into Laravel using the external system, i created the same credentials in laravel's user table, so i want to check external username against laravel username, get the password and auto-login into laravel.
where to do this is the main problem i face.

enter image description here

I need this screen to autologin enter image description here

Routes middleware:

Route::group(['middleware' => ['role:admin,access_backend']], function(){

Route::get('dashboard', 'dashboardController@dashboard');
.....
.....

I Get username from external system using guzzle

$client = new Client(); //GuzzleHttp\Client
$result = $client->get($url);
$body = (string)$result->getBody();  



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire