/**
  * Register/login user via social network app.
  *
  * @param AuthenticateUser $authenticateUser
  * @param SocialiteProvider $socialiteProvider
  * @param Request $request
  * @param $provider Socialite provider name.
  * @return mixed
  */
 public function loginWithProvider(AuthenticateUser $authenticateUser, SocialiteProvider $socialiteProvider, Request $request, $provider)
 {
     if (!$socialiteProvider->isValid($provider)) {
         abort(404);
     }
     return $authenticateUser->execute($request->has('code') || $request->has('oauth_token'), $provider, $this);
 }
Beispiel #2
0
 public function login(AuthenticateUser $authenticateUser, Request $request, $provider = null)
 {
     if (is_null($provider)) {
         return view(Config('constants.frontView') . '.login');
     } else {
         return $authenticateUser->execute(Request::all(), $this, $provider);
     }
 }
 public function getFacebook(AuthenticateUser $authenticateUser, Request $request)
 {
     $hasCode = $request->has('code');
     $hasErro = $request->has('error');
     if ($hasErro) {
         return redirect()->route('home');
     }
     return $authenticateUser->facebook($hasCode, $this);
 }
 public function login(AuthenticateUser $authenticateUser, Request $request, $provider = null)
 {
     if (!$provider) {
         if ($request->isMethod('post')) {
             return $this->postLogin($request);
         } else {
             return $this->getLogin();
         }
     }
     return $authenticateUser->execute($request->all(), $this, $provider);
 }
 public function callback($driver, \App\AuthenticateUser $authenticateUser, Request $request)
 {
     //return "Login using ".$driver;
     return $authenticateUser->execute($request->has('code'), $driver, $this);
 }
Beispiel #6
0
 public function appLogin(AuthenticateUser $authenticateUser, Request $request)
 {
     return $authenticateUser->appExecute($request);
 }
Beispiel #7
0
 /**
  * [handleProviderCallback description]
  * 
  * @param  [type]           $provider         [description]
  * @param  AuthenticateUser $authenticateUser [description]
  * @param  Request          $request          [description]
  * @return [type]                             [description]
  */
 public function handleProviderCallback($provider, AuthenticateUser $authenticateUser, Request $request)
 {
     $hasCode = $request->has('code');
     return $authenticateUser->execute($provider, $hasCode, $this);
 }
 public function login(AuthenticateUser $authenticateUser, Request $request)
 {
     return $authenticateUser->execute($request->has('code'));
 }
Beispiel #9
0
 public function store(AuthenticateUser $authenticateUser, Request $request)
 {
     return $authenticateUser->updateUser($request->all(), $this);
 }
Beispiel #10
0
 public function login(AuthenticateUser $authenticateUser, Request $request, $provider = null)
 {
     return $authenticateUser->execute($request->all(), $this, $provider);
 }
Beispiel #11
0
 public function login($provider, AuthenticateUser $authenticateUser, Request $request)
 {
     return $authenticateUser->execute($provider, $request->has('code'), $this);
 }
Beispiel #12
0
 public function logout(AuthenticateUser $authenticateUser)
 {
     return $authenticateUser->logout($this);
 }
 /**
  * @param AuthenticateUser $authenticateUser
  * @param Request $request
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function Github_login(AuthenticateUser $authenticateUser, Request $request)
 {
     $hasCode = $request->has('code');
     return $authenticateUser->execute($hasCode, $this);
 }
Beispiel #14
0
 public function login(AuthenticateUser $authenicateuser, Request $request, $provider = null)
 {
     $hasCode = $request->has('code');
     return $authenicateuser->execute($hasCode, $this, $provider);
 }
 public function login(AuthenticateUser $authenticateUser, Request $request)
 {
     $authenticateUser->execute($request->has('code'), $this);
     return Socialite::with('github')->redirect();
 }
Beispiel #16
0
 /**
  * @param AuthenticateUser $authenticateUser
  * @param Request $request
  * @return mixed
  */
 public function getFacebook(AuthenticateUser $authenticateUser, Request $request)
 {
     return $authenticateUser->execute('facebook', $request->has('code'), $this);
 }
Beispiel #17
0
 public function mfHandleAuthentication(AuthenticateUser $pAuthUser)
 {
     //call function from AuthenticateUser class
     return $pAuthUser->mfExecute(Request::all(), $this, 'facebook');
 }
 public function doSocial(AuthenticateUser $authenticate, Request $request, $provider = null)
 {
     return $authenticate->execute($request->has('code') || $request->has('oauth_token'), $this, $provider);
 }
 /**
  * Register with some social provider, like facebook, google+.
  *
  * @param AuthenticateUser $authenticateUser
  * @param Request $request
  * @param null $provider
  * @return mixed
  */
 public function social_register(AuthenticateUser $authenticateUser, Request $request, $provider = null)
 {
     return $authenticateUser->execute($request->has('code'), $this, $provider);
 }
Beispiel #20
0
 public function auth(AuthenticateUser $authenticateUser, $provider = null)
 {
     return $authenticateUser->execute(Request::all(), $this, $provider);
 }