Exemple #1
0
 public function loginSso()
 {
     \Cas::authenticate();
     $api = new ApiController();
     $user = $api->_getUserAttributes(\Cas::getCurrentUser());
     $_user = User::where('username', $user->username)->first();
     if (!$_user) {
         $_user = new User();
         $_user->email = $user->email;
         $_user->nip = $user->nip;
         $_user->username = $user->username;
         $_user->save();
     }
     \Auth::login($_user);
     return redirect('/');
 }