Exemplo n.º 1
0
 /**
  * Helper to process an OAuth login form.
  *
  * @param Application $app
  * @param Request     $request
  * @param Form        $form
  *
  * @throws Exception\InvalidProviderException
  *
  * @return null|Response
  */
 private function processOauthForm(Application $app, Request $request, Form $form)
 {
     $providerName = $form->getClickedButton()->getName();
     $enabledProviders = $this->getMembersConfig()->getEnabledProviders();
     if (array_key_exists($providerName, $enabledProviders)) {
         $this->getMembersOauthProviderManager()->setProvider($app, $providerName);
         return $this->processLogin($app, $request);
     }
     return null;
 }